Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Lisp/ Script for Quickselect and draworder

Anonymous

Lisp/ Script for Quickselect and draworder

Anonymous
Not applicable

I really have to do some simple task. But I havn't written any LISP/Script yet.

 

 

 

I  have 'n' layers and  want 

1- qselect(Quick select)

2- Quick select

Apply to: entire drawing

Object type: Multiple

Properties: Layer

Operator: equal

value: layername

 

 

2- Bring all elements oof 'layername' to top. by draworder and 

 

save dwg.

 Any help ?

 

0 Likes
Reply
3,001 Views
6 Replies
Replies (6)

Anonymous
Not applicable

Qselect or filter commands will not work with scripts, try this line at the top of your script to filter for your layer then follow it with the draworder and save

 

(setq ss1 (ssget "X" ' ((8 . "yourlayername"))))

 

 

0 Likes

Anonymous
Not applicable

I tried this already

 

(defun c:SALL ()
(setq ss1 (ssget "X" ' ((8 . "LC"))))
)

 

but  running command SALL  doesn't do anything. No error.

 

Any lisp to bring  selected objects front or back by using draworder

0 Likes

Anonymous
Not applicable

Try this -

 

(Defun C:SALL()
(setq ss1 (ssget "X" ' ((8 . "LC"))))
(Command "Draworder" ss1 "" "Front" "")
)

 

 

 

0 Likes

Anonymous
Not applicable

It works. But I cann't use it in Autocad Lt. Is there any method to use it in Lt.

0 Likes

Anonymous
Not applicable

Best to try asking in the LT Forum,

0 Likes

pendean
Community Legend
Community Legend
SELECTSIMILAR then DRAWORDER: both commands explained in HELP.
0 Likes