' 定义二维多段线的点
points(0) = 2: points(1) = 4
points(2) = 4: points(3) = 2
points(4) = 6: points(5) = 4
' 在模型空间中创建一个优化多段线对象
Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
'三等分多段线第一条线段,中间两个点的坐标为:
x1=points(0)+(points(2)-points(0))/3
x2=points(0)+2*(points(2)-points(0))/3
y1=points(1)+(points(3)-points(1))/3
y2=points(3)+2*(points(3)-points(1))/3
|