Hello everyone,
I have to create a function that fits the dimensions along the segments of a polyline.
I have made this function, but is not able to manage the arcs present in a polyline.
In fact to obtain the vertices of the polyline using the following function:
(defun vertexpoli (oggreg / coords n p listavertex)
(vl-load-com)
(setq coords (vla-get-coordinates (vlax-ename->vla-object oggreg)))
(setq coords (vlax-safearray->list (vlax-variant-value coords)))
(setq n 0)
(setq p (list (nth n coords) (nth (+ n 1) coords)))
(repeat (/ (length coords) 2)
(progn
(if listavertex
(setq listavertex (append (list p) listavertex))
(setq listavertex (list p))
)
(setq n (+ n 2))
(setq p (list (nth n coords) (nth (+ n 1) coords)))
)
)
listavertex
)
Can you give me some advice on how to implement it, add to the list, the data of the arcs?