
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The thread title is what it is...
I need a lisp that will do the following commands in order. Lando7189 was able to que me into the following code which would do commands in order and here's what I got so far:
(defun C:SB nil (command "LAYON" "LAYTHW" "SELECT" "ALL" "SETBYLAYER" "Y" "Y") (princ) ;clean exit )
I come up with the following error in the command line:
Command: SB
LAYON
All layers have been turned on.
Command: LAYTHW
All layers have been thawed.
Command: SELECT
Select objects: ALL 320 found
Select objects: SETBYLAYER
*Invalid selection*
Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/Previous/Undo/AUto/SIngle/SUbobject/Object
Select objects:
It's as if it doesn't accept the selection set before performing the setbylayer command. Maybe there is better lisp code to do this?
I also would like to know if there is a lisp or command out there for unlocking all layers in a drawing similar to how laythw or layon work. I know of LAYULK which gives you a picker to click a locked layer, but end goal is just to unlock all layers for editing. This would probably be the first command in the list or just before selecting all and doing SETBYLAYER if possible.
Thanks,
Warren
Solved! Go to Solution.