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

LISP input needed for command with a popup window (like MAPBREAK)?

james_beeson_01
Participant

LISP input needed for command with a popup window (like MAPBREAK)?

james_beeson_01
Participant
Participant

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.

0 Likes
Reply
Accepted solutions (1)
787 Views
3 Replies
Replies (3)

O_Eckmann
Mentor
Mentor
Accepted solution

Hi @james_beeson_01 ,

 

Here is code

(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) 
	   "" 
	   "_Y"  ; Filter by layer _YES 
	   "*"   ; name of layer * = all
	   "_N"  ; Select object manually : _NO
	   "_Y"  ; Ignore topology _YES
	   "_Y"  ; Keep Object Data _YES
  )
)

 

Olivier Eckmann

EESignature

0 Likes

james_beeson_01
Participant
Participant
Thank you! How did you get there?
0 Likes

O_Eckmann
Mentor
Mentor

Hi,

 

Set variable CMDDIA to 0 and launch MAPBREAK at command line.

You obtain command without dialog, and you know what to answer.

 

Olivier Eckmann

EESignature