explode a pline.... sort of...

Discussion in 'AutoCAD' started by calpolyarc, Mar 9, 2005.

  1. calpolyarc

    calpolyarc Guest

    I'd like to explode a multi segment pline so that none of the segments are joined but the segements still remain plines, rather than converting to lines. Is this possible? Thanks.
     
    calpolyarc, Mar 9, 2005
    #1
  2. You don't need a program for this, just follow this simple macro:

    1. explode the polyline

    2. use the command MPEDIT --[ and use the Previous selection]

    Select objects: p
    4 found

    Select objects:

    Convert Lines and Arcs to polylines? [Yes/No] <Yes>:

    Enter an option [Open/Close/Join/Width/Fit/Spline/Decurve/Ltype gen/eXit]
    <eXit>:
     
    Luis Esquivel, Mar 9, 2005
    #2
  3. calpolyarc

    calpolyarc Guest

    thanks guys! :)
     
    calpolyarc, Mar 9, 2005
    #3
  4. calpolyarc

    James Allen Guest

    Explode -> pedit - multiple - previous - yes - enter - enter
    --
    James Allen, EIT
    Malicoat-Winslow Engineers, P.C.
    Columbia, MO


    joined but the segements still remain plines, rather than converting to
    lines. Is this possible? Thanks.
     
    James Allen, Mar 9, 2005
    #4
  5. calpolyarc

    wkiernan Guest

    Here's a little thing that breaks your LWPOLYLINE without losing width data on the segments.

    [pre]; PLBUST breaks an LWPOLYLINE into individual LWPOLYLINE
    ; segments without destroying width data.
    ; (c) 2005 Terrible Software Inc. WDK - everybody use it for free

    (defun-q C:pLBUST( / oldcmd ename edata vcount )
    (setq oldcmd (getvar "cmdecho"))
    (setvar "cmdecho" 1)
    (if (setq ename (entsel "\nSelect LWPOLYLINE: "))
    (if (= "LWPOLYLINE" (cdr (assoc 0 (setq edata (entget (setq ename (car ename)))))))
    (progn
    (setq vcount -1)
    (while (assoc 10 edata)
    (setq edata (cdr (member (assoc 10 edata) edata)) vcount (1+ vcount))
    )
    (princ (strcat "\nBreaking LWPOLYLINE into " (itoa vcount) " separate LWPOLYLINES..."))
    (command "pedit" ename)
    (while (> (setq vcount (1- vcount)) 0)
    (command "e")
    (repeat vcount (command "n"))
    (command "b" "g" "x")
    )
    (command "")
    (princ "done!")
    )
    (princ "\nEntity selected is not an LWPOLYLINE. ")
    )
    (princ "\nNo entity selected. ")
    )
    (setvar "cmdecho" 0)
    (prin1)
    )[/pre]
     
    wkiernan, Mar 9, 2005
    #5
  6. calpolyarc

    Anne Brown Guest

    wkiernan -

    Unfortunately deleting the first post will remove the second one
    since it answers the first. Let's leave it since you corrected
    with your second post.
    ---
    Anne Brown
    Discussion Groups Administrator
    Autodesk, Inc.

    wkiernan wrote:
    (snip)
     
    Anne Brown, Mar 9, 2005
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.