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

Novice question

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
david_brude
411 Views, 2 Replies

Novice question

Hi,

I have several drawings used in a prototype drawing set that I wish to process and change the draw order of my border to send it to the back. If I use (command "draworder" (tblsearch "block" "aceborderb") b ) the command line returns nil. I have no indication whether the selection is being passed to the draworder command or not. I'm pretty sure there is something wrong with my syntax. Any help is much appreciated.

 

Thanks,

David

 

2 REPLIES 2
Message 2 of 3
Kent1Cooper
in reply to: david_brude


@david_brude wrote:

...I wish to ... change the draw order of my border to send it to the back. If I use

(command "draworder" (tblsearch "block" "aceborderb") b )

the command line returns nil. I have no indication whether the selection is being passed to the draworder command or not. ....


Commands requiring object selection need to be fed entity names.  But (tblsearch) returns a whole list of data about the Block definition, and nothing about any inserted copy of the Block.  Also, you need to complete the selection with an Enter [""], and the Back option needs to be in double-quotes.

 

If there's only one such Block in the drawing [including all layouts], you could probably do it with something like this [untested]:

 

(command "_.draworder" (ssname (ssget "X" '((2 . "aceborderb"))) 0) "" "_back")

Kent Cooper, AIA
Message 3 of 3
david_brude
in reply to: Kent1Cooper

Thank you Kent. Your solution was spot on and worked the first time. I had looked at ssget but didn't know how to apply it. I need to study more. Regards, David Brude

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

Post to forums  

Autodesk Design & Make Report

”Boost