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

Exploding Polyline Question

12 REPLIES 12
Reply
Message 1 of 13
Anonymous
2458 Views, 12 Replies

Exploding Polyline Question

I was wondering if there is a way to explode a polyline, but have it remain a polyline? When I explode a polyline containing many angles, the polylines all turn into regular lines...is there a solution to this?

 

Thanks

12 REPLIES 12
Message 2 of 13
tcorey
in reply to: Anonymous

It's sounds like you're saying you want to explode a polyline but you don't want the polyline exploded. That makes my head spin.  😉

 

What property are you trying to eliminate from the original polyline? Maybe there is a solution other than using EXPLODE.



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 3 of 13
Anonymous
in reply to: tcorey


@tcorey wrote:

It's sounds like you're saying you want to explode a polyline but you don't want the polyline exploded. That makes my head spin.  😉

 

What property are you trying to eliminate from the original polyline? Maybe there is a solution other than using EXPLODE.


Haha, it is a bit confusing, especially with how I tried to explain it. Here is a long (probably confusing) explanation/question:

 

When I explode a single long polyline containing many PIs, tangents, etc., they all turn into smaller broken-apart regular lines. I want all of the broken-apart regular lines to remain as broken-apart polylines instead. I don't want to select them all again and turn them into individual polylines, it would take some time in my case.

 

Shorter easier to understand question:

Why does a polyline turn into a regular line when it is exploded?

 

I want to keep the 'elevation' property on the polylines that are exploded. A regular line doesn't have an 'elevation' property.

Message 4 of 13
tcorey
in reply to: Anonymous

After exploding the polyline, use PEDIT command, Multiple option, select all the newly created lines and arcs. AutoCAD will ask if you want to turn them into polylines. Say yes and then Enter until back at the command prompt. You will now have individual Polylines. 

 

Just FYI, when a polyline explodes down to lines and arcs, the objects won’t have an elevation property, but their points will have z values. 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 5 of 13
Jeff_M
in reply to: Anonymous

Here's a quick little lisp that will automate the task for you:

 

(defun c:pexplode(/ ss idx ent)
  (if (setq ss (ssget '((0 . "LWPOLYLINE"))))
    (progn
      (setq idx -1)
      (while (setq ent (ssname ss (setq idx (1+ idx))))
	(command ".explode" ent)
	(command "pedit" "m" "p" "" "y" "")
	)
      )
    )
  (princ)
  )
Jeff_M, also a frequent Swamper
EESignature
Message 6 of 13
Anonymous
in reply to: Anonymous

If you are exploding a 2d polyline, the vertices didn't have elevation information to start with (a polyline can only exist at one elevation).  Exploding a 3d polyline and the line segments will retain their elevation data.

 

 

Message 7 of 13
tcorey
in reply to: Anonymous


@Anonymous wrote:

If you are exploding a 2d polyline, the vertices didn't have elevation information to start with 

 


Not to be overly pedantic about it, but that's not really true. In a 2D Polyline or LWPolyline, each vertex has the same elevation, but they do have elevations. Use LIST command on any polyline and you will see that each vertex has x, y and z. 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 8 of 13
codee
in reply to: Anonymous

1) Explode the polyline

2) activate "PEDIT"

3) select "multiple"

4) Select all of the exploded normal lines and arcs

5) "convert" to polylines?" YES

 

Message 9 of 13
Anonymous
in reply to: tcorey

I feel like that's splitting hairs....  does each pline vertex have an elevation? Or does only the pline itself have an elevation?  Both are technically correct and if you start questioning what "has" the elevation you get some sort of philosophical paradox.  

 

Point is, exploding a 2d pline will result in all segments having the same elevation.

Message 10 of 13
tcorey
in reply to: Anonymous


@Anonymous wrote:

I feel like that's splitting hairs.... 


No doubt about it. That's why I said I'm probably being overly pedantic, but...



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 11 of 13
AllenJessup
in reply to: Anonymous


@Anonymous wrote:

does each pline vertex have an elevation? Or does only the pline itself have an elevation? 


The old 2D Polylines carried an elevation for each vertex. The newer LWPolylines have one elevation for the whole entity. There are additional differences.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 13
Anonymous
in reply to: Jeff_M

That is GENIUS! How do I make it so that my CAD remembers your lisp, so I do not have to constantly input that into my CAD everyday. 

 

My Polylines used to explode automatically and still be polylines but for some reason they turn into lines... I do not like to use lines because then you cannot put a Global Width to it anymore. Besides your lisp, I couldn't find any other way to get my explode function back to the way it used to be. 

Message 13 of 13
AllenJessup
in reply to: Anonymous

Probably the easiest way would be to drag it into the Startup Suite. Browse in the upper pane to the location you keep the Lisps. Then drag from the upper pane to the Startup Suite.

 

AllenJessup_0-1623953030661.png

 

There are other way such as loading it from the acaddoc.lsp file. See HERE

 

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report