Afternoon,
I've been trying to look for or create a LISP Routine that'll go and break a polyline at either a specific point on a polyline that isn't closed, or to go and select two points on a closed polyline to go and leaving me the original polyline and a new polyline that was cut out of the original. I need it to be able to go and be able let me click at endpoints, mid-points or anywhere along the polyline where I need it to be. I've been using the code provided below as a reference. The issue I have with it, is that when the polyline is closed, it wants to go and break the polyline at the point I clicked it at and make that new polyline go back to the first vertex. If y'all have the solution, I would appreciate the help.
(defun c:breakpoint (/ object points) ;Breaks object at points;
(setq object (entsel)) ;Set the first variable;
(princ "Specify Break Point: ") ;Set the request that you want on screen;
(setq point (getpoint)) ;Set the second variable;
(command "_break" object "f" point point)) ;insert the command that you are working with;
@marcus_bogner wrote:....If y'all have the solution, I would appreciate the help.
(defun c:breakpoint...
Unless you are running a very old year-version of C3D, there is a command for that:
https://help.autodesk.com/view/ACD/2021/ENU/?guid=GUID-E0439DE0-B2C3-4233-BB4D-5A574A00694B
https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-E0439DE0-B2C3-4233-BB4D-5A574A00694B
I do not have 2019 so I cannot confirm that the options listed here work. But there seems to be a possible solution in the forum post here:
@marcus_bogner wrote:I use 2019 civil 3d.
Have you had a chance to test what is available yet? From this post for example
or just something like
(defun C:BreakAtPoint()
(command "._break" "f" "@")
);end
Hi Marcus,
Welcome to the forum!
Here are a few suggestions from our experts that might help:
Forum Solutions: As @NateSarles mentioned, a possible solution is discussed here.
Custom LISP: If you prefer sticking to a custom LISP routine, you might want to try the following snippet shared by @pendean:
(defun C:BreakAtPoint()
(command "._break" "f" "@")
);end
This might help achieve the break at the exact point you click without reverting to the first vertex.
Feel free to try these suggestions and let us know how it goes.
That's how Break command works. Break, select the item and where you select also becomes the first break point. If you are trying to break the item in two at that point, simply type @ when asked for second point. Also, _Breakatpoint is now a native AutoCAD command. This has you select an item to break and then asks for a break point. No gap is created.
Can't find what you're looking for? Ask the community or share your knowledge.