If 3dpoly is not fitted(smooth) to get list of all vertexes use
(defun 3dPolyVertexes (eo / take pointlist3d)
;returns vertexes of 3dpolyline
(defun take (amount lst / ret)(repeat amount (setq ret (cons (car lst) (take (1- amount) (cdr lst))))))
(defun pointlist3d (lst / ret) (while lst (setq ret (cons (take 3 lst) ret) lst (cdddr lst))) (reverse ret))
(if (not (= (type eo) 'VLA-OBJECT)) (setq eo (vlax-ename->vla-object eo)))
(cond
((= (vlax-get eo 'ObjectName) "AcDb3dPolyline")
(setq ptlist (pointlist3d (vlax-get eo 'coordinates)))
)
)
ptlist
)
For smoothed 3dpolyline use
(vlax-curve-getpointatdist eo 20)
where eo is vla object created from 3dpoly entity
(defun c:get3dPolyVertexes ( / e ptlist )
(setq e (car(entsel "\nSelect 3dpolyline")))
(if (and (setq ptlist (3dPolyVertexes e)))
ptlist
(progn (princ "\nSelected entity is not 3dpolyline!")(princ))
)
)
Miljenko Hatlak

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.