Jump to content
Mark_Anif

Convert 3D Polyline to 2D Polyline

Recommended Posts

Mark_Anif

Hi all..

 

can help me how to convert 3d polyline to 2d polyline in autocad 2008?

 

thank you..

Share this post


Link to post
Share on other sites
ttray33y

have you tried the CONVERT command?

Share this post


Link to post
Share on other sites
eldon

Have you tried the Flatten command?

Share this post


Link to post
Share on other sites
rkmcswain

Although flatten will change all of the vertices of a 3D polyline to 0.0, the entity will technically remain a "3D polyline" (the bitcode 8 is still set on group code 70).

 

So you'll have a "2D" polyline as far as the "Z" coordinates all being 0.0, but if a application is testing this entity for a 3D polyline, that will still be true.

Share this post


Link to post
Share on other sites
rkmcswain
Hi all..

 

can help me how to convert 3d polyline to 2d polyline in autocad 2008?

 

thank you..

 

I just tested this lisp routine in 2015 and it worked okay. Should work fine in 2008 also.

Share this post


Link to post
Share on other sites
anniesmith

You can use some of software tools available. And this video can also

Share this post


Link to post
Share on other sites
Tiger

EXPLODE -> PEDIT>JOIN ?

 

If you wanna go the less fancy route without those new-finagled apps and stuff. Now, gerroff mah lawn!

Share this post


Link to post
Share on other sites
Takis Tsiberis

Select the 3D Poly,

then do

Modify -> Explode

then

select all the lines

then (in the properties window)

set "Start Z" to 0.00 (that is zero)

also

set "End Z" to 0.00

finally

select all the lines

then do

Modify -> Join

  • Thanks 1

Share this post


Link to post
Share on other sites
mohammad-hassan

explode & join it

Share this post


Link to post
Share on other sites
ahmedasem1

Thank you  . i try it it working fine

On 9/26/2020 at 8:38 PM, Takis Tsiberis said:

Select the 3D Poly,

then do

Modify -> Explode

then

select all the lines

then (in the properties window)

set "Start Z" to 0.00 (that is zero)

also

set "End Z" to 0.00

finally

select all the lines

then do

Modify -> Join

 

Share this post


Link to post
Share on other sites
BIGAL

If you dont have any arcs then the simplest is get Co-ordinates, erase, then create a new pline.

Share this post


Link to post
Share on other sites
lrm

@BIGAL  per AutoCAD help "A 3D polyline is a connected sequence of straight line segments created as a single object. 3D polylines can be non-coplanar; however, they cannot include arc segments."  No arcs,

 

Explode,flatten join.

or

with osnap set to end   you can use pline and pick the 3dpoly vertices in order.  Vertices of the 3dpoly that you pick will be projected to a 2D plane that is parallel to the current xy plane and that contains the first vertex you digitize. 

 

Share this post


Link to post
Share on other sites
BIGAL

Yeah forgot about no arcs, would be pretty easy to add a trans so recreated in world UCS. Just strip z, looking at the link.

Share this post


Link to post
Share on other sites
Trudy

Something i extract from one code.

command is 3dpto2d

Work only for Plines without ARCs :)

(defun LM:group-n ( l n / r )
    (if l
        (cons
            (reverse (repeat n (setq r (cons (car l) r) l (cdr l)) r))
            (LM:group-n l n)
        )
    )
)

(defun c:3dpto2d (/ listt XY)
(setq sel (ssget '((0 . "POLYLINE"))))

(repeat (setq i (sslength sel))
	(setq Vname (vlax-ename->vla-object (ssname sel (setq i (1- i)))))
	(if (equal (vlax-get Vname 'ObjectName) "AcDb3dPolyline")
		(progn
			(setq coord (vlax-get Vname 'coordinates))
			(setq listt (LM:group-n coord 3))
				(foreach x listt (setq XY (cons (list (car x) (cadr x)) XY)))
					(ENTMAKE
						(APPLY
						(FUNCTION APPEND)
						(CONS (LIST '(0 . "LWPOLYLINE")
									'(100 . "AcDbEntity")
									'(67 . 0)
									'(410 . "Model")
									(cons 8 (getvar 'clayer))
									'(100 . "AcDbPolyline")
									(CONS 90 (LENGTH XY))
									(if (= (vlax-get Vname 'Closed) 0) (cons 70 0) (cons 70 1))
								)
								(MAPCAR (FUNCTION LIST)
										(MAPCAR (FUNCTION (LAMBDA (XY) (CONS 10 XY))) XY)                     
								)
						)
						)
					)
			(setq XY nil)
		)
	)
)
(princ)
)

 

Share this post


Link to post
Share on other sites
rkmcswain
27 minutes ago, Trudy said:

 

Work only for Plines without ARCs :)

 

 

Which is fine, since 3D polylines cannot contain arcs anyway.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...