dobdob 发表于 2012-4-14 15:29:41

求多段线顶点数目的函数,但是调用时msgbox accountpoints没有生效?

'统计多段线的顶点数目
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

搞不懂啊搞不懂,就这么点函数,也能出问题,各位抽点空指点一下吧!

页: [1]
查看完整版本: 求多段线顶点数目的函数,但是调用时msgbox accountpoints没有生效?