Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
E.S.7.9
Posts: 83
Registered: ‎07-03-2012
Message 1 of 3 (259 Views)
Accepted Solution

how to assign formules to attribute tag strings

259 Views, 2 Replies
02-27-2014 10:17 PM

hi ,

 

i have 4 text string in my attribute block and i wanna assign some formules some of them ..

 

i wrote one example belowe

 

1th text string [ A ]  ;  500

2nd text string [ B ] will be ;  [ A ] +1250

3th text string [ C ] will be :  [ B ] / 2

4th text string [ D ] will be : [ B ] + [ C ]

 

all strings will change when i change to 1th string

 

somebody can write me a routine code for this example ?

Insert your block.

Double click to edit attributes

In "Value" field, right click and pick "Insert Field..."

From "Field names", pick "Formula"

Type in your formula; when you want to insert another att value, right clik again (in formula field) and pick "Insert Field.."

From the new dialog, pick "objects", select your block, select attribute name from list, press OK on every dialog box.

Repeat for every attribute.

 

You may need to regen dwg several times to make sure avery field display the correct value.

You have to do this everytime you insert a new block, but if you copy a block these settings are keept.

 

See attachment.

Please try attached block example.

You only need REGEN or UPDATEFIELD once after changing the first attribute value

4 att.png

Distinguished Contributor
phanaem
Posts: 149
Registered: ‎02-06-2007
Message 2 of 3 (235 Views)

Re: how to assign formules to attribute tag strings

02-27-2014 11:48 PM in reply to: E.S.7.9

Insert your block.

Double click to edit attributes

In "Value" field, right click and pick "Insert Field..."

From "Field names", pick "Formula"

Type in your formula; when you want to insert another att value, right clik again (in formula field) and pick "Insert Field.."

From the new dialog, pick "objects", select your block, select attribute name from list, press OK on every dialog box.

Repeat for every attribute.

 

You may need to regen dwg several times to make sure avery field display the correct value.

You have to do this everytime you insert a new block, but if you copy a block these settings are keept.

 

See attachment.

*Expert Elite*
3wood
Posts: 1,061
Registered: ‎03-25-2009
Message 3 of 3 (228 Views)

Re: how to assign formules to attribute tag strings

02-28-2014 12:00 AM in reply to: E.S.7.9

Please try attached block example.

You only need REGEN or UPDATEFIELD once after changing the first attribute value

4 att.png

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.