Lines, polylines, 3Dpolylines
Can lines be promoted to polylines, more easily than via PEDIT, and can both be promoted to 3Dpolylines?
Comments
-
For multiple lines probably MPEDIT (command from Express Tools) is more simple - it works on preselected entities, so you can use some selection set and confirm conversion of selected entities to polylines, while in PEDIT you need to choose Multiple option, then select entities.
But I don't know about conversion to 3Dpolylines.
0 -
If selecting say 3d lines you could erase all touching and create a new 3dpoly using a lisp. A 2d poly in a UCS could say be converted to a 3d poly in World.
I am sure if you do a bit of googling will find an answer that joins multiple lines into a single 3dpoly with non zero ends.
Give this a try limited testing.
; https://forum.bricsys.com/discussion/40355/lines-polylines-3dpolylines#latest
; Lines to 3dploy by AlanH May 2026(defun c:L23D ( / ss x lst sp ep doc)
(setq ss nil)
(setq ss (ssadd))
(setq lst '())
(while (setq ent (car (entsel "\nPick lines in join order ")))
(setq ss (ssadd ent ss))
)
(repeat (setq x (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss (setq x (1- x)))))
(setq ep (vlax-get obj 'EndPoint))
(setq sp (vlax-get obj 'StartPoint))
(setq lst (cons ep lst))
(setq lst (cons sp lst))
)
; remove duplicates
(setq x 3)
(setq lst2 '())
(setq lst2 (cons (nth 0 lst) lst2))
(setq lst2 (cons (nth 1 lst) lst2))
(repeat (/ (- (length lst) 2) 2)
(setq lst2 (cons (nth x lst) lst2))
(setq x (+ x 2))
)(setq doc (vla-get-activedocument (vlax-get-acad-object) ))
(if (= (vla-get-activespace doc) 0)
(setq curspc (vla-get-paperspace doc))
(setq curspc (vla-get-modelspace doc))
)(setq lst2 (apply 'append lst2))
(setq tmp (vlax-make-safearray vlax-vbDouble (cons 0 (- (length lst2) 1))))
(vlax-safearray-fill tmp lst2)
(setq myobj (vla-Add3DPoly curspc tmp))(princ)
)
(c:L23D)0 -
Some utilities can convert 2D polylines to 3D polylines and vice versa. CADPower can and I think Dotsoft ToolPac also can do this.
If you have to do this a lot it might be worth considering to get one of those.
0 -
CONVERTPOLYcommand?0



