在vba中创建二维多段线时,帮助中定义如下:
dim points(0 to 9) as double 确定了5个顶点
如果我现在需要由其他程序导入多段线顶点,多段线顶点的数目由一参数K确定,该如何解决?
我试图 dim points as variant
然后给k个顶点赋值
最后 set plineobj= thisdrawing.modelspace.addlightweightpolyline(points)
执行出错,参数不对。
dim points(0 to 9) as double
' 赋值
set plineobj= thisdrawing.modelspace.addlightweightpolyline(points)
dim newpoints as variant
' 重定义
plineobj.coordinates=newpoints