StevenMc Posted July 24, 2009 Posted July 24, 2009 hi all, could anyone tell me if there is a command to split a line into segments? i know there is the divide command but that does not physically split the line, it just gives it points. i need the line to be seperate segments without the gap like the break command gives. sorry if i'm not too clear on this, its hard to put into words :wink: cheers Steven Quote
ReMark Posted July 24, 2009 Posted July 24, 2009 Didn't someone (Lee Mac?) write a lisp routine that did something similar to this? Sorry, just can't recall for sure. Check around. Quote
StevenMc Posted July 24, 2009 Author Posted July 24, 2009 Didn't someone (Lee Mac?) write a lisp routine that did something similar to this? Sorry, just can't recall for sure. Check around. thanks ReMark, i have had a search but but cant seem to find it. i'll ask Lee if he has done this previously or maybe he can help me out if he hasnt. Quote
rkmcswain Posted July 24, 2009 Posted July 24, 2009 hi all, could anyone tell me if there is a command to split a line into segments? i know there is the divide command but that does not physically split the line, it just gives it points. i need the line to be seperate segments without the gap like the break command gives. The ._BREAK command doesn't leave a gap if you break it at a single point. Use the "@" character to specify the second point. Command: ._BREAK Select object: Specify second break point or [First point]: _F Specify first break point: Specify second break point: @ Command: Quote
rkent Posted July 24, 2009 Posted July 24, 2009 hi all, could anyone tell me if there is a command to split a line into segments? i know there is the divide command but that does not physically split the line, it just gives it points. i need the line to be seperate segments without the gap like the break command gives. sorry if i'm not too clear on this, its hard to put into words :wink: cheers Steven The attached may work for what you want. Open the lisp file to see all the various commands available to you. In each case there have to be lines on or crossing the object to use for break points. Not one I wrote, author is noted in lisp file. BreakObjects18.LSP Quote
SledgeHammer Posted November 29, 2010 Posted November 29, 2010 RKMcSwain´s answer worked perfect for me. thanks, love you guys out there! Quote
BIGAL Posted November 30, 2010 Posted November 30, 2010 Also brillance by Lee Mac ;;------------------------=={ Segs }==------------------------;; ;; ;; ;; Divides selected objects into an LWPolyline with a ;; ;; specified number of segments ;; ;;------------------------------------------------------------;; ;; Author: Lee McDonnell, 2010 ;; ;; ;; ;; Copyright © 2010 by Lee McDonnell, All Rights Reserved. ;; ;; Contact: Lee Mac @ TheSwamp.org, CADTutor.net ;; ;;------------------------------------------------------------;; (defun c:Segs ( / *error* _StartUndo _EndUndo doc ss ) (vl-load-com) ;; © Lee Mac 2010 (defun *error* ( msg ) (and doc (_EndUndo doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (defun _StartUndo ( doc ) (_EndUndo doc) (vla-StartUndoMark doc) ) (defun _EndUndo ( doc ) (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-EndUndoMark doc) ) ) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)) *segs (cond ( *segs ) ( 10 ))) (if (and (setq ss (ssget "_:L" '((0 . "ARC,CIRCLE,LWPOLYLINE,SPLINE,LINE,ELLIPSE")))) (progn (initget 6) (setq *segs (cond ((getint (strcat "\nSpecify Number of Segments <" (itoa *segs) "> : "))) ( *segs ))) ) ) ( (lambda ( j / e inc i pts ) (_StartUndo doc) (while (setq e (ssname ss (setq j (1+ j)))) ( (lambda ( inc i / pts ) (repeat (1+ *segs) (setq pts (cons (trans (vlax-curve-getPointatDist e (* (setq i (1+ i)) inc)) 0 e) pts)) ) (if (entmake (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 (length pts)) (cons 38 (caddar pts)) (cons 70 0) ) (vl-remove-if 'null (mapcar (function (lambda ( d ) (assoc d (entget e)))) '(6 8 39 48 210) ) ) (mapcar (function (lambda ( a ) (cons 10 a))) pts) ) ) (entdel e) ) ) (/ (vlax-curve-getDistatParam e (vlax-curve-getEndParam e)) (float *segs)) -1 ) ) (_EndUndo doc) ) -1 ) ) (princ) ) Quote
Organic Posted December 1, 2011 Posted December 1, 2011 The attached may work for what you want. Open the lisp file to see all the various commands available to you. In each case there have to be lines on or crossing the object to use for break points. Not one I wrote, author is noted in lisp file. This is exactly what I was looking for. This works fine although I am wondering if there is a built in function in AutoCad 2012 or Civil 3D 2012 that does this yet? Quote
JD Mather Posted December 1, 2011 Posted December 1, 2011 This works fine although I am wondering if there is a built in function in AutoCad 2012 or Civil 3D 2012 that does this yet?[/QUOTe] I don't know about AutoCAD 2012 or Civil 3D, but in Autodesk Inventor the command for splitting a line is called, well, Split.... Quote
jamesp1426 Posted April 8, 2013 Posted April 8, 2013 I realize this is an older post, but RKMcSwain´s answer was exactly what I was looking for, thanks. Quote
SLW210 Posted April 9, 2013 Posted April 9, 2013 Since at least AutoCAD 2011 there is a Ribbon button for Break at Point. Quote
jamesp1426 Posted April 9, 2013 Posted April 9, 2013 Yes, I realized that after searching and posting. Quote
danellis Posted April 10, 2013 Posted April 10, 2013 Since at least AutoCAD 2011 there is a Ribbon button for Break at Point. But unfortunately the "@" option does seem to work on the command line since the same time dJE Quote
irneb Posted April 10, 2013 Posted April 10, 2013 But unfortunately the "@" option does seem to work on the command line since the same time dJE Actually that "break at point" button is nothing more than taking RK's answer and implementing it inside the CUI as a macro:^C^C_break \_f \@ Quote
rkmcswain Posted April 10, 2013 Posted April 10, 2013 Actually that "break at point" button is nothing more than taking RK's answer and implementing it inside the CUI as a macro:^C^C_break \_f \@ Yea, I think that has been in the "menu" for years and years. Along with a few other "commands", that are actually macros to do more than the command by itself. Quote
kodama Posted June 29, 2013 Posted June 29, 2013 when a line or arc is divided after using DIVIDE how can you select the points/ nodes that are placed. I would like to start drawing line from these but they seem impossible to select. All help appreciated Quote
nestly Posted June 29, 2013 Posted June 29, 2013 how can you select the points/ nodes that are placed.I would like to start drawing line from these but they seem impossible to select. Use the NODE Osnap. Here are 3 methods. 1) Start the LINE command, then when prompted for a start point, type NODE 2) Start the LINE command, then when prompted for a start point SHIFT-Right click and select NODE from the Osnap menu 3) Right-Click on the OSnap button on the Status bar and make NODE a running Osnap Hint, you may want to change the node style to make the points easier to detect. Type DDPTYPE at the command line to see the options. Quote
kodama Posted June 29, 2013 Posted June 29, 2013 ooh boy, what a time saver! Thanx a lot for this tip Nestly! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.