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

change entities layers in deep nesting blocks

3 REPLIES 3
Reply
Message 1 of 4
superjoe
224 Views, 3 Replies

change entities layers in deep nesting blocks

something like below:
level 1 block consists of
level 2 block y1
level 2 block y2
level 3 block z1
level 3 block z2
level 2 block y3
what kind of algorithm should i use? i'm kind of lost in lisp coding, need a clear hint from you guys, many thanks!
3 REPLIES 3
Message 2 of 4
superjoe
in reply to: superjoe

to be more specific, only one instance of level 1 block existed in drawing, which cannot be selected using (setq ss (ssget "x" (list (cons 0 "insert") (cons 66 1)))), but it's OK if using (setq ss (ssget "x" (list (cons 0 "insert"))))
Message 3 of 4
bnarum1
in reply to: superjoe

If the block does not have any attributes it can't be selected with the (cons 66 1)

have you tried using "nentsel" refer to the acad help.
B
Message 4 of 4
superjoe
in reply to: superjoe

thanks B.
better not have any user selections, i find the way out, use (tblobjname "block" blockname) instead of (tblsearch "block" blockname), the only thing now is to make recursive subroutine to step through nesting blocks no matter how deep it is.

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

Post to forums  

Autodesk Design & Make Report

”Boost