Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
superjoe
Posts: 99
Registered: ‎06-16-2002
Message 1 of 4 (72 Views)

change entities layers in deep nesting blocks

72 Views, 3 Replies
06-05-2007 02:45 AM
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!
Valued Contributor
superjoe
Posts: 99
Registered: ‎06-16-2002
Message 2 of 4 (72 Views)

Re: change entities layers in deep nesting blocks

06-05-2007 03:01 AM 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"))))
Distinguished Contributor
bnarum1
Posts: 169
Registered: ‎11-24-2003
Message 3 of 4 (72 Views)

Re: change entities layers in deep nesting blocks

06-05-2007 04:27 AM 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
Valued Contributor
superjoe
Posts: 99
Registered: ‎06-16-2002
Message 4 of 4 (72 Views)

Re: change entities layers in deep nesting blocks

06-05-2007 06:38 PM 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.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!