This is a sample script for return and draw points from polyline, 3dpolyline and spline autocad object.
The difference about lwpolyline and polyline is the properties elevation and coordinates.
Infact the Polyline object (spline or imported objects to gis application 'two dimensional') have an array points format x,y and the z value same another properties : 'elevation'.
So to retrieve x,y,z vertex coordinates from polyline to draw points, visual lisp need to access 'coordinates', for x,y value, and 'elevation' for z value.
Lwpolyline and 3dpolyline have an array coordinates format x,y and z, so the script need only access to the properties 'coordinates'.
The selection used in the sample script is a multiple selection whit prompt controll about the number of the selected objects and the number of points drawn.
All object in the selection to not match with polylines, lwpolylines, splines and 3dpolys isn't elaborate in the script.
The script don't erase the selected objects but only draw all polylines vertex as points objects
The demo of this application is provided FREE by cadoptimize.com