LISP to reassociate multiple fields (in one object / block) to point to selected object

LISP to reassociate multiple fields (in one object / block) to point to selected object

LOESCH_PK
Advocate Advocate
5,344 Views
20 Replies
Message 1 of 21

LISP to reassociate multiple fields (in one object / block) to point to selected object

LOESCH_PK
Advocate
Advocate

Hello LISP Masters.

 

I've been thinking of a LISP that would prompt user to select a 'source' object -> get its ObjectID, then ask for destinantion object (Fields, MText, Block with attributes) and go through all fields in destination object and replacing original ObjectID in field expression to that of the selected source object.

 

Detaild explanation in attached image.

 

This is to allow for making detailed TAGs in 'vanilla' AutoCAD and then easily reassociating them to respected objects (eg. door TAG to door block). 

LISP - update ObjectID of all fields in selected object.jpg

0 Likes
Accepted solutions (1)
5,345 Views
20 Replies
Replies (20)
Message 21 of 21

dlanorh
Advisor
Advisor

The parameter number doesn't correspond to the order of the accessable parameters, as my observations have noted that parameter actions and parameter action grips also have parameter numbers. I am part way into coding the routine which constructs the field string, but this requires extracting and storing more information from the dictionary (I need 3 items parameter type number and name), so my previous dotted pair list solution needs revising.

 

This will allow you to select a block, then a parameter by name from a list and then paste the correct field for that into a text/mtext/attribute.  This will speed up creating new or altering existing tag blocks fields so the previous lisp works smoothly. Unfortunately I don't have a lot of free time currently to devote to this due to work commitments. If things go well, I may have something by next Monday (27th) as I'll have the weekend without a "chore" list. 

I am not one of the robots you're looking for

0 Likes