is there a function to obtain the start angle and end angle of a pline,i know arcs do
thanks
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
@markruys2 wrote:is there a function to obtain the start angle and end angle of a pline....
If 'ent' is the entity name of the Polyline, and you have (vl-load-com) loaded:
(angle '(0 0 0) (vlax-curve-getFirstDeriv ent (vlax-curve-getStartParam ent)))
(angle '(0 0 0) (vlax-curve-getFirstDeriv ent (vlax-curve-getEndParam ent)))
Returned values will be in radians.
Kent,
Are you sure about the ename? I believe it is the vla-object:
;;for end angle (in radians)
(setq obj (vlax-ename->vla-object(car(entsel))))
(angle '(0 0 0) (vlax-curve-getFirstDeriv obj (vlax-curve-getEndParam obj)))
@Anonymous wrote:...
Are you sure about the ename? I believe it is the vla-object:
....
Doug:
This question comes up now and then. The (vlax-curve-...) functions at least, though certainly not all (vla...) functions, work with entity names just as well as with VLA objects. It spares the need to make the conversion, unless that is also needed to do other things with the same entity, that do require it. I have loads of routines that do these kinds of things using entity names, and they all work fine.
Can't find what you're looking for? Ask the community or share your knowledge.