Lisp to add attribute with field value in dynamic block

Lisp to add attribute with field value in dynamic block

francine.zimmermannSRSWJ
Advocate Advocate
215 Views
2 Replies
Message 1 of 3

Lisp to add attribute with field value in dynamic block

francine.zimmermannSRSWJ
Advocate
Advocate

I make a lot of block like the attached example and I need time to create the attribut with field value.  I've found a few ideas on the forums, but not exactly what I'm looking for.

 

The step to create my dynamic block


1. Draw a dynamic block with different parameter, for example B & H
2. By lisp add an attribut: Name-(BxH) B and H are field value

 

It would save me a lot of time, but is it possible?

For example I found Augi5.lsp but that is linked to a table

0 Likes
216 Views
2 Replies
Replies (2)
Message 2 of 3

cadffm
Consultant
Consultant

Hi,

 

>>" I need time to create the attribut with field value"

That's not unusual, you need time to draw every line or text too!?


>"By lisp add an attribut: Name-(BxH) B and H are field value"

>"It would save me a lot of time, but is it possible?"

 

Much time?

Without programming:

Copy the ATTDEF to the clipboard, paste it while in the new block.

Edit the attdef and controle/edit both fields - what needs 5-10secs, depending on if you have to edit one or both.

 

CTRL+V

doubleclick - attdef

doubleclick - first field (if needed), select the right parameter

doubleclick - second field (if needed), select the right parameter

 

 

-

 

A tool needs to know the parameter names, if them always the same, it is possible.

 

 

"For example I found Augi5.lsp but that is linked to a table"

Augi5 copy the parameter values from a Blockreference to Attributes!

I guess you want to create a default value for an Attdef in a Blockdefinition, what linking to parameters.

 

 
 

 

 

Sebastian

0 Likes
Message 3 of 3

francine.zimmermannSRSWJ
Advocate
Advocate

I thought a repetitive action could be resolved by a lisp

0 Likes