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

ssget a specific Dynamic block... since they are anonymous?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
mdhutchinson
741 Views, 3 Replies

ssget a specific Dynamic block... since they are anonymous?

If you do a LIST command on a dynamic block... AutoCAD tells you the Block Name as well as the Anonymous Block name.

How can I use ssget to snag all Dynamic Blocks that use the 'Real Block'?

 

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: mdhutchinson

Would this work for you, I have this in a program written for me.  Except I would modify for the block name dxf code.

 

(setq ITEMS (ssget '((0 . "INSERT") (2 . "`*U*")))

 

Untested since I don't like using dynamic blocks and have none to test on.

Message 3 of 4
mdhutchinson
in reply to: Anonymous

I know this to work as you suggest... I've done this many times...

However, what I was hoping to find is a way to get the selection set of dynamic block references that were spawned from a particular dynamic block definition.

Even if I had to iterate through an ssget set and test to see if the anonymous block was linked to a particular definition.

Message 4 of 4
mdhutchinson
in reply to: mdhutchinson

I found it...

 

vla-get-effectivename

 

So I just iterate the selection set and check if the name is the one I want... if it is then I ssadd it to a selection set.

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

Post to forums  

Autodesk Design & Make Report

”Boost