Guys,
I am clear on how to get the start point, end point and to set a specific distance of a LWPOLYLINE.
(setq ET (entlast))
(setq OBJ (vlax-ename->vla-object ET))
(setq STRTPT (vlax-curve-getStartPoint OBJ))
(setq ENDPT (vlax-curve-getendPoint OBJ))
(setq PLPT (vlax-curve-getpointatdist OBJ "MyPolylinePoint"))
This will give me the angle of the first segment, if i am correct. Not clear on how it is doing it. I have read a previous thread though couldn't follow.
(setq ANGL
(* (/ 180 pi)
(angle (list 0.0 0.0 0.0)
(vlax-curve-getFirstDeriv OBJ
(vlax-curve-getparamatdist OBJ 0.0001))
)
)
)
Is it possible with code to determin how many actual segments a polyline has ?
How do I cycle through and get the angle and direction for multiple segments of the LWPOLYLINE ?
Could someone please try an explain the small code above that determins the angle and what it is doing ? The "K.I.S.S." (keep it simple stupid) method is much preffered as i am simple.
Any assistance is much appreciated.
Stephen