Gets polyline information in selected CAD data. LTCustomizer21 for AutoCAD LT reference manual

ActiveX
  
Function get_select_polyline(ename As Integer) As Integer
    Function get_select_polyline_vertex(ename As Integer, index As Integer, ByRef x As Double, ByRef y As Double, ByRef z As Double) As Boolean
C/C++
    int WINAPI LTC_get_select_polyline(int ename);
    int WINAPI LTC_get_select_polyline_vertex(int ename,int index,double xyz[3]);

parameter
ename :index number read by select(). Specifies a value in range of 0 - return value of select() -1.
index:index of polyline. Specifies a value in range of 0 - return value of get_select_polyline() -1.
xyz[3](C/C++): vertex of polyline. 1st index is X. 2nd index is Y. 3rd index is Z
x,y,z(ActiveX):vertex of polyline.

return value(get_select_polyline())
Number of polyline

return value:(get_select_polyline_vertex())
True or 1:success False or 0: failure

If return value of get_select_polyline() is more than 0, data that indicates ename means polyline.
Then, gets coordinates of polyline using get_select_polyline_vertex().

Example:
Dim x,y,z As Double
If (num=get_select_polyline(ename))>0 Then
for i=0 to num-1
  get_select_polyline_vertex(ename,i,x,y,z)
Next i
Endif

Caution:

1. LTCustomizer21 does not support all polyline format because polyline is very complex data structure. get_select_polyline() returns 0 in case of spline,polymesh and polyline containing arc. Though polyline exists also 2 kinds(POLYLINE,LWPOLYLINE), you don't need to distinguish them if you use get_select_polyline() and get_select_polyline_vertex().

2. Don't call get_select_polyline() many times because get_select_polyline() carries on complex process in it.(refer to above example)

3. In case of point when you drew on User Coordinates System(UCS),the coordinates is on local coordinates system(UCS) you set. if you don't know coordinates of AutoCAD LT, recognize that World Coordinates System(WCS, first coordinates after AutoCAD LT run ) is basic coordinates system. In this case, the CAD data is added DXF group code 210,220,230(means normal vector which see from WCS). So you have to convert if you use the point as WCS. Also you consider origin coordinates of UCS you set. Origin coordinates of UCS can get by using read_DXF_table(). About detail of this thing, refer to UCS,OCS in AutoCAD or AutoCAD LT help. .