@samparer wrote:
.... what the index is for getting the length of a "LWPOLYLINE" (if there is one). .... is there any tips on finding these index's? .....
As others have implied, there isn't an entry in entity data for length -- it's only a result of the geometry of an object, determined by calculation from pieces of information that are stored in the list.
[The DXF codes are also in AutoCAD's Help system, listed >here<, though I haven't compared whether that source is any better or more comprehensive than AfraLisp's.]
IN CASE you need to do this with other kinds of objects, be aware that not everything that has length has a "Length" property. For a Circle, it's "Circumference". For an Ellipse or a Spline, it's not there at all, either as a VLA property or in the (getpropertyvalue) approach. For an Arc, the VLA property is "ArcLength" but there isn't a (getpropertyvalue). BUT there is a universal way of getting the length that can be used on all these as well as on things that have a "Length" property per se [Lines, Polylines]. If 'ent' is either an entity name or a VLA-object conversion of one, do this:
(vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent))
[Don't use ...getDistAtPoint and ...getEndPoint , because for closed objects that returns 0.]
Kent Cooper, AIA