+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: Splitting Line

  1. #1
    Senior Member StevenMc's Avatar
    Using
    AutoCAD 2009
    Join Date
    Mar 2009
    Location
    Glasgow
    Posts
    222

    Default Splitting Line

    Registered forum members do not see this ad.

    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

    cheers
    Steven
    "Leave it on the doorstep and get the hell outta here!"

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2015
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    40,727

    Default

    Didn't someone (Lee Mac?) write a lisp routine that did something similar to this? Sorry, just can't recall for sure. Check around.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  3. #3
    Senior Member StevenMc's Avatar
    Using
    AutoCAD 2009
    Join Date
    Mar 2009
    Location
    Glasgow
    Posts
    222

    Default

    Quote Originally Posted by ReMark View Post
    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.
    "Leave it on the doorstep and get the hell outta here!"

  4. #4
    Senior Member
    Computer Details
    hoss's Computer Details
    Operating System:
    Windows 7 - 64 Bit
    Computer:
    Dell Precision T1600
    Using
    MEP 2012
    Join Date
    Jun 2007
    Location
    South Yorkshire, UK
    Posts
    228

    Default

    try this one. It seems to work
    Attached Files

  5. #5
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-4770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2015
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,935

    Default

    Quote Originally Posted by StevenMc View Post
    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 point>
    Specify second break point: @
    Command:

  6. #6
    Forum Deity rkent's Avatar
    Computer Details
    rkent's Computer Details
    Operating System:
    WIN7 PRO 64bit
    Computer:
    Dell Precision T7500
    CPU:
    Xeon Dual Core E5503 2.0Ghz
    RAM:
    6GB DDR3 ECC SDRAM, 1333MHz, 6x1GB
    Graphics:
    nVidia Quadro 3800
    Primary Storage:
    Samsung 480Gb SSD
    Monitor:
    Dell 24" FS (2x)
    Discipline
    Mechanical
    rkent's Discipline Details
    Occupation
    Facilities Design - Semi-conductor manufacturing
    Discipline
    Mechanical
    Details
    Designer: Process Piping, P&ID's, Machine Part Design, Planning / General Arrangement. Facilities Management. Drafting: Electrical, Controls, Architectural.
    Using
    Mechanical 2014
    Join Date
    Nov 2007
    Location
    Lat:35, Long:-106, Elev: 5164'
    Posts
    3,998

    Default

    Quote Originally Posted by StevenMc View Post
    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

    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.
    Attached Files
    Sometimes there's a man... I won't say a hero, 'cause, what's a hero? But sometimes, there's a man. And I'm talkin' about the Dude here. Sometimes, there's a man, well, he's the man for his time and place. He fits right in there. And that's the Dude, in Los Angeles. - The Stranger, The Big Lebowski

  7. #7
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Nov 2010
    Posts
    1

    Default

    RKMcSwain´s answer worked perfect for me.

    thanks, love you guys out there!

  8. #8
    Luminous Being
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    5,547

    Default

    Also brillance by Lee Mac

    Code:
    ;;------------------------=={ 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)
    )

  9. #9
    Forum Deity Organic's Avatar
    Discipline
    Civil
    Using
    AutoCAD 2015
    Join Date
    Feb 2009
    Posts
    2,210

    Default

    Quote Originally Posted by rkent View Post
    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?

  10. #10
    Luminous Being JD Mather's Avatar
    Using
    Inventor 2015
    Join Date
    Sep 2007
    Location
    Williamsport, PA
    Posts
    8,541

    Default

    Registered forum members do not see this ad.

    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?
    I don't know about AutoCAD 2012 or Civil 3D, but in Autodesk Inventor the command for splitting a line is called, well, Split....
    Attached Images
    Certified SolidWorks Professional
    Autodesk Inventor 2014 Certified Professional
    Autodesk AutoCAD 2013 Certified Professional
    http://home.pct.edu/~jmather/content..._Tutorials.htm

Similar Threads

  1. Splitting polygons.
    By its.personal in forum AutoCAD General
    Replies: 0
    Last Post: 24th Jun 2009, 08:09 am
  2. Splitting a Solid in 3ds
    By cadboi08 in forum 3D Modelling
    Replies: 7
    Last Post: 30th Aug 2008, 07:48 am
  3. Splitting the Autodesk Forum
    By Mr T in forum Feedback
    Replies: 5
    Last Post: 27th May 2004, 10:05 pm
  4. Splitting Layers?
    By Qwest in forum AutoCAD Drawing Management & Output
    Replies: 11
    Last Post: 30th Apr 2004, 01:34 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts