'统计多段线的顶点数目
public function accountpoints(pl as acadlwpolyline) as integer
dim points as variant, i as integer
points=pl.coordinate(0)
i=0
do while(vartype(points) <> vbempty)
i=i+1
points=pl.coordinate(i)
loop
accountpoints = i
msgbox accountpoints
end function