AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
james_beeson_01
530 Views, 3 Replies

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

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

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.

Labels (3)
3 REPLIES 3
Message 2 of 4
O_Eckmann
in reply to: james_beeson_01

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

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

Message 3 of 4
james_beeson_01
in reply to: O_Eckmann

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

Thank you! How did you get there?
Message 4 of 4
O_Eckmann
in reply to: james_beeson_01

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

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report