- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
TLDR: How do I find the input needed to run a lisp for a command with a popup window (like MAPBREAK)?
The lisp I am writing, in part, breaks certain linetypes that intersect a rectangle without any clicks or user input. I am using MAPBREAK because it does a large part of that task. However, I don't know what input it needs. With some commands, it isn't difficult to figure that out - I could just run it the command line, which essentially tells me what I need to enter. However, MAPBREAK uses popup windows. It isn't run solely in the command line, so I don't know what to put in the lisp.
I can't seem to find any documentation for MAPBREAK that would say the command line prompts in order and what constitutes as valid input. I got this far from asking ChatGPT what kind of input it would take for a point coordinate, which is the furthest it could take me.
Here is what I have:
(defun c:BreakRectangle ()
(setq pointList '("1410719,14650757,0"
"1412338,14650757,0"
"1412338,14649836,0"
"1410719,14649836,0"
"1410719,14650757,0"))
(command "MAPBREAK" "D"
(nth 0 pointList)
(nth 1 pointList)
(nth 2 pointList)
(nth 3 pointList)
(nth 4 pointList)
; What comes next to finish out the command?
)
)
PS: To be clear, the lisp gets these point coordinates automatically and loops through several rectangles, but I reduced this to the necessary part for sake of simplicity. Also, I would use "Extents" instead of "Define", but it gives me an error and doesn't matter a whole lot.
Solved! Go to Solution.