Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FIND DYNAMIC BLOCK NAME THAT was STRETCHED , ROTATED

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
amyyoyo1
453 Views, 3 Replies

FIND DYNAMIC BLOCK NAME THAT was STRETCHED , ROTATED

I am currently working with a routine that will pick up all the blocks inside of a drawing and compare it with a list of block names that I had,and use it to make a legend.

when I was testing the routine I realize that if the block had being strectched, rotated or changed from symbol with text to just symbol, the routine won't pick up the block name ,becasue autocad will assign a new name to it in the entity list (some thing like "2 . U324")which something I didn't know before.

I still really new to autolisp, and I sure someone here will know this long ago. It's there an otherway for me to pick the orginal block name not the autocad assign name?

thank you.

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: amyyoyo1

Dynamic blocks,

after modify some dynamic property, becomes a anonymous block, to retrieve the block name, as a vlaobject, use the effectivename propertie

 

i.e.

(setq obj (vlax-ename->vla-object (car (entsel "\nSelect a DynBlock : "))))
(setq name (vlax-get-property
      obj
      (if (vlax-property-available-p obj 'effectivename)
        'effectivename
        'name
      )
    )
)

 

Henrique

EESignature

Message 3 of 4
amyyoyo1
in reply to: hmsilva

Thank you so much it work perfectly.Smiley Happy

Message 4 of 4
hmsilva
in reply to: amyyoyo1

You're welcome!
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost