AutoCad :: Mapping Values To Title Blocks Using Autolisp Routines?

Nov 19, 2012

I am trying to map values to my title block using an autolisp routine. I have entered (getenv "NEXTSHEET") & (getenv "PREVSHEET") into the descriptions fields and mapped these routines to 'NEXT_ATTRNAME' & 'PREV_ATTRNAME' attributes. When I run the title block updates no values appear on my drawing. Please note that I have included the program in my start-up suite. Please also note that when I enter 'NEXTSHEET' or 'PREVSHEET' on the command line, the routines are called and the correct values are shown on the command line. I just need these values to be visible on my drawing. I have attached the Autolisp routine that I am running.

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Attribute Blocks - Change 1st Tag Values Automatically According To 2nd Values

Jul 18, 2013

I have an attribute blocks and this att block has two tag values , is there a simple code for to change 1st tag values automaticly according to  2nd values ?

for example :

1st tag (50x50) - 2nd tag ( 100 )    ==> 50x50-100

if i enter 201 valuse to 2nd tag then 1 st tag has to change as 100x100

if i enter 501 valuse to 2nd tag then 1 st tag has to change as 150x510

I attached a jpg file for explain much better

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Attribute Values From Multiple Blocks With Same Name?

Mar 21, 2013

This time I'm wrestling with getting the values from multiple blocks. The blocks all have the same name but at least the attributes have names this time. Each block have exactly 4 attributes, like: att1 (a number representing chronological order), att2 (some data), att3 (the actual date as a string of when the data was added), att4 (some more data)

I need to get and store the attribute's values. I was hoping to make a selectionset of the blocks and step through using the chronological order number.

At this point I have tried several combinations of foreach and ssget "x" (list (cons 2 MYBLOCK)), but I keep getting errors that I'm sure are telling me that I'm not passing the correct information to the function for iterating through. I'm banging my head.

(DEFUN c:GFOR (/ ATTLST REVBLK CNT CNT1 BLK RBLK ATTVAL ATT REV#)
(SETQATTLST(LIST "R#" "INIT" "DATE" "DESC")REVBLK(ssget "x" (list (cons 0 "INSERT") (cons 2 "REVISION")))CNT0CNT10 )
(vlax-ldata-put "dict" "RevTotal" (BLKCNT "REVISIONS")) (FOREACH BLK REVBLK (SETQ RBLK (ssname BLK CNT1)) (setq ATTVAL (mapcar '(lambda (x) (vla-get-TextString x)) (vlax-invoke (vlax-ename->vla-object RBLK) 'GetAttributes))) (foreach ATT ATTLST (SETQ REV# (STRCAT "REVISION" (1+ CNT)))
(vlax-ldata-put "dict" REV# (member ATTVAL)) (setq CNT (1+ CNT)) ) (SETQ CNT1 (1+ CNT1)) ) (PRINC))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Transfer Attribute Block Values To Another Attribute Blocks

Jul 3, 2012

I wanna transfer my attribute block values to another attribute text blocks , is there any lisp for that?

Is there a possibility for sum tag values of choice attribute blocks to inside of another attribute text block ?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Updating Old Routines?

Oct 14, 2001

I have a routine I wrote years ago for R12 and it worked fine. Now when I try it in 2000 it freezes Acad when I select the first button. The routine is for structural steel members and the idea is to select a country of origin which brings up a list, then select a section type from the list which brings up another list of all available sizes. You then select the
size member you want then insert it into the drawing. There is also an option to explode the block on insertion. If I remove the (set_lista) section from the following line it doesn't freeze.

(action_tile "AUS" "(setq sectype AA)(setq Country 1)(set_lista)")

(set_lista) is a selection of lists, the list to use is determined by the variable "sectype".

I can select the country I want then cancel the dialog box and type (set_lista) at the command line then reopen the dialog box and the list is refreshed. Just won't do it automatically.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Of Routines With DCL Files

Aug 8, 2012

I have writted a set of lisp routines with dcl files that I have implemented in most versions of Autocad since release 14. I can install the toolbars in Autocad 2013 but when I try to execute on of the commands, either by toolbar icon or command line, I get the message "Unknown Command".

I have added the appropriate paths to path list.

Dell Precision M4400 Laptop

Vista Business

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Merge Two Align Object Routines

Nov 23, 2011

I've gotten these two routines from different threads on here. One works with *text and blocks.  The second works with multileaders.

I'd like to merge the two so one command can work with a selection set of any of the above objects (assume selection set of mixed objects - some multileaders, some text, some blocks)
 
(defun c:at ( / ss ang *error*)(vl-load-com)(ErrorHandler '("cmdecho" "osmode"))(setvar "cmdecho" 0)(setvar "osmode" 576)(setqss (ssget '((0 . "*TEXT,INSERT")))ang (getangle "
Select two points along desired alignment:"))(mapcar'(lambda (x)(vla-put-rotation(vlax-ename->vla-object x)ang))(mapcar 'cadr (ssnamex ss)))(*error* nil))(defun c:test (/ ss ang i sset)(vl-load-com); Tharwat 17. 05. 2011 (if (and (setq ss (ssget ":L" '((0 . "MULTILEADER")))) (setq ang (getangle "
Specify Rotation Angle :"))) (repeat(setq i (sslength ss)) (setq sset (ssname ss (setq i (1- i)))) (vla-put-TextRotation (vlax-ename->vla-object sset) ang)) (princ)) (princ))
 
Or see C:AT and C:TEST in the attached file

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating A Script To Run Multiple Routines?

Apr 17, 2012

I have hundreds of drawings I want to run through scriptpro with a script calling 3 different lisp routines.  I have the 3 lisps working independantly but can't figure out how to get them to all run in one script.

Two of the Lisps are for redefining the title block in 2 different types of drawings that have different title blocks.  The last lisp locks all viewports in all windows.  I'll attach the 3 lisps I'm trying to merge in the script.  I am not very versed in scripts and lisps so I'm guessing at least 2 of these lisps could be merged into a single lisp...

Here is what I have for the script file contents (which doesn't work):

(load "redefine100")

(load "redefine102")

(load "vlocker")

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Installing Tool Pallets And Routines

Sep 18, 2012

We are working together whit another firm and we would like to share our tool pallets and lisp routines. The pallets and lisp files we would like to share are quite large so we would like to simply send them a USB stick whit all the files and a title "executable" program that automatically puts them on the right place and changes the appropriate information.

View 2 Replies View Related

AutoCad 2D :: Dynamic Title Blocks With Text Attributes In Title Column

Aug 14, 2013

i have created some dynamic title blocks with text attributes in title column. I have gone back an added some more attributes at a later date and these new ones will not move with my dynamic stretch! I have tried everything, modifying the action, re-doing the action, nothing works!

View 3 Replies View Related

AutoCAD Inventor :: Retaining Title Block Prompted Entries When Changing Title Blocks

Apr 26, 2013

The title blocks that we use have prompted entries in them and I would like to find a way using iLogic to copy the entries from one title block to another within the same drawing; i.e.. if the user decides to change from an A2 to A1 drawing.

I already have an iLogic rule which allows the user to change the active border, title block and sheet size based on a form selection but would like it to capture the prompted entries already entered and re-use them after the change.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Conversion Of Base Routines To Diesel MACRO Based Routine

Jul 3, 2012

" Convertion of AUTOLISP base routines to Diesel MACRO based routine to be used in a AUTOCAD LT based platform "

Here i am attaching the lisp file for ready reference.

View 1 Replies View Related

AutoCAD Dynamic Blocks :: Exploding Blocks With Negative Values?

Apr 24, 2013

I built a building foundation for a grading plan and I have another building that is the exact mirror of it. I have tried to mirror it. Didn't work. I created a block of the feature lines and inserted it with a -1 x value but I can't explode it. I tried the regular explode and xplode. Neither worked. I can use the the block to draw feature lines over but it just seems so much easier if I could figure out how to explode the block.

C3D 2013

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All Blocks Like Selected Blocks With Window?

Feb 28, 2011

(defun CELBLKS ( / e blk ss blkl)
 (setq blkl ""  ss (ssadd))
 (while (setq e (entsel "

[Code]....

i have this lsp, it works great but how can modify it if i want select with a window.? exemple: if i have 3 differentes blocks, i want to select them with windows and the lisp select all blocks that are identical of those 3.?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert The Blocks In Dwg File To Lines That Are Centered On Those Blocks?

Jan 24, 2012

I have a project in 3D that I would like to export to Stadd.  This requires lines rather than blocks.  Is is possible to convert the blocks in the attached dwg file to to lines that are centered on those blocks?

View 9 Replies View Related

AutoCad :: 2010 - Totaling Attribute Values Of Same Blocks?

Mar 23, 2012

I have a attributed block with multiple attributes (called pkey). In some cases these block attributes will the same values save for one, "Total".

example:

pkey #1
Value AA, Value BB, Value CC, Total 20

pkey #2
Value AA, Value BB, Value CC, Total 30

Is there a way by which I can have AutoCad group these blocks together (when extracted into a table for example) and have the SUM of those "Totals" added together to produce a result such as:

Value AA, Value BB, Value CC, Total 50.

I've explored using fields, but I don't think they work in this case, unless I'm using them wrong.

View 2 Replies View Related

AutoCad :: Dynamic Blocks - Custom Variables / Values?

Jul 12, 2012

Just a quick query about Dynamic Blocks. I use dynamic blocks with various visibility states regularly in my drawings. Is it possible to add some kind of custom variable or value to a dynamic block so that I can identify them in automated scheduling?

For example, if I have a dynamic block which represents three variations of very similar machine models is it possible to somehow give each visibility state a value, ie: the model numbers. M100/M125/M150 etc which can then be extrapolated depending which visibility state is active?

Also regarding the limitations of dynamic blocks. Is there a number of visibility states I should not exceed so that the blocks still perform 100%?

View 3 Replies View Related

AutoCad :: Drawing Title Blocks

Mar 30, 2013

I wanted to get opinions on the most efficient way of creating & saving title blocks, with regards to using them in future projects.

1. Create a title block in model space then save it as a .dwt file

OR

2. Create a title block in model space then save it as a block

I can't imagine there's a right or wrong way, just wanted get your input. Chances are you all know something I don't.

View 9 Replies View Related

AutoCad :: Overlapping Of Title Blocks

Apr 7, 2012

In a drawing file customer wants to create 2 title block. both the title blocks should be added to the same drawing. At any point of time only one should be visible to the user. Basically users in one country will see first title block and users in another country will see second title block.

View 1 Replies View Related

AutoCAD 2010 :: Reset Values Of Blocks Without Affecting Its Actual Size

Oct 4, 2012

Any way to REset all values of a block after scaling it to 1,1,1, without afecting its actual size on the screen?

View 9 Replies View Related

AutoCAD Dynamic Blocks :: Setting Parameter Values At Block Insertion?

Jun 16, 2011

how (if) I can set up my dynamic blocks so that I can set the parameter values as I insert the block, rather than with the grips afterwards?

To take a simple example; I have a block consisting of a rectangle, with 2 linear stretch parameters - length, width. Can I set it up so that when I insert the block, it asks for the length and breadth,just as it would for attributes.

View 4 Replies View Related

AutoCAD 2010 :: Dynamic Title Blocks

Feb 4, 2013

I need to create a dynamic title block, so I can change the date on layout 1 and all the others change too.

View 5 Replies View Related

AutoCAD Inventor :: Importing Title Blocks From Other IDW?

Mar 14, 2011

Right now I'm copying it from one file to the other... but I'm sure there is some other way. Are title blocks saved anywhere other than embebed in the file? Autodesk Product Design Suite 2012 Ultimate Autodesk Developer Network [URL]

View 9 Replies View Related

AutoCad :: 3 Title Blocks In Paper Space

Jan 31, 2012

I’ve been given a drawing with 3 drawings w/title blocks in Paper Space, REV A, B & C. A is on the left, B is in the middle and C is on the right. It appears somebody has been printing REV B as when I select print it jumps straight to that drawing.

How would I print REV A or C? I can do it now but I have to delete the other 2 drawings so it focuses on the only remaining drawing.

View 3 Replies View Related

AutoCad :: Title Blocks In Layout Wizard?

Nov 14, 2012

When I start the layoutwizard and proceed to the insert title block the only choice I have is none. I have several title blocks created and cannot remember where to tell Cad to look. I just setup a new PC and installed AutoCad 2011.

View 9 Replies View Related

AutoCAD Inventor :: Insert Two Title Blocks In IDW Drawings

Aug 22, 2013

I need to insert two different (separate) title blocks into my idw drawings so both show on the drawing.  One is the real Title block, and one is a Revision History block.  I have listed them as Title blocks under Drawing Resources, but Inventor won't allow me to insert both. Is there any way round this?

I do not want the Revision History block as a Symbol.

Inventor 2011; MS Windows 7-64; i5-2500; 8Gb; GF550Ti.

View 9 Replies View Related

AutoCAD Map 3D :: Modifying Title Blocks For Map Book Templates

May 16, 2013

I have trouble modifying the title blocks for the map book templates . Is there a specific folder that I need to save the adjusted title block in. Going through the block editor doesn’t work so I’m exploding the block and once I do that the links have been broken between the title block and map books.

View 2 Replies View Related

AutoCAD Inventor :: Drawing Templates And Title Blocks

Apr 15, 2013

Have more than one drawing template? (we use A and B size sheets)

My questions concerns, metric vs imperial A vs B vs C etc etc drawing sheet size title block does not scale down accordingly when change sheet size within an existing drawing template.

Is it possible to have one drawing template that can be toggle imperial vs metric, and then sheet size selected and then the title block scaled down or up accordingly? (I would assume this could be done using iLogic)

Or is it normal to have different drawing templates for sizes and units?

View 9 Replies View Related

AutoCad :: Import Default Templates (Title Blocks)?

Mar 25, 2011

I want to import default templates (Title Blocks) with in Auto cad. Is there any option ? How to proceed?

View 3 Replies View Related

AutoCAD Dynamic Blocks :: Precision Of Values In Drop Down Menu When Using Block Properties Table

Jun 20, 2012

i was wondering if it's possible to change the default precision of values in the drop down menu for linear parameters when using a block properties table from 4 digits to 0.

See attached file, when opening the dropdown menu, the centre-to-centre widths of the chair are displayed in a value with 4 digits "behind the comma" and i would like that to be 0.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Sum Of Attribute Values

Jul 29, 2005

Say I have a block that contains two attributes, one contains a value that is a number and another contains a value that is letters. I have many of these blocks placed in a drawing, could you create a lisp that would return the sum of the number value and return it to the command line along with the letter value. Something like this:

Sum--------Item
128 RP
389 TD1
2389 SP4

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved