Message 1 of 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am creating a command that will generate a new layer, and alert the user to select all sheets using the rectangle command with the new layer. I need help getting the rectangle command to repeat, so that the user can keep drawing rectangles until they exit the command.
The number of rectangles will vary per user, so I would need to make this loop indefinitely. I tried adding the while before the rectang command, but it still finishes the lisp with only 1 rectangle.
I am a newbie, this is my first lisp.
(defun c:PL ()
(command "-layer" "_M" "00PRINTLAYER" "_C" "1" "" "")
(alert "Please Select All Sheets to Plot")
(while (command "rectang"))
(princ)
)
Solved! Go to Solution.