Sub 批注_2节点数量坐标()
Dim sh As ShapeRange, s1 As Shape, s2 As Shape
Set sh = ActiveSelectionRange
For i = 1 To 50 'Step 2
x1 = sh(1).SnapPoints.Edge(i, 0#).PositionX '节点x
y1 = sh(1).SnapPoints.Edge(i, 0#).PositionY '节点y
If x1 = 148.434 Then Exit For
Debug.Print x1 & " , " & y1
Set s1 = ActiveLayer.CreateEllipse2(x1, y1, 4) '以节点为中心画圆
Set s2 = ActiveLayer.CreateArtisticText(x1, y1 - 3, i) '在小圆中间添加序号
If i > 9 Then s2.SetSize 5, 6 '调整序号宽高
sw = s2.SizeWidth '获取序号宽度
s2.LeftX = x1 - sw / 2 '调整序号位置 x 方向
Next
MsgBox i - 1
End Sub
Dim sh As ShapeRange, s1 As Shape, s2 As Shape
Set sh = ActiveSelectionRange
For i = 1 To 50 'Step 2
x1 = sh(1).SnapPoints.Edge(i, 0#).PositionX '节点x
y1 = sh(1).SnapPoints.Edge(i, 0#).PositionY '节点y
If x1 = 148.434 Then Exit For
Debug.Print x1 & " , " & y1
Set s1 = ActiveLayer.CreateEllipse2(x1, y1, 4) '以节点为中心画圆
Set s2 = ActiveLayer.CreateArtisticText(x1, y1 - 3, i) '在小圆中间添加序号
If i > 9 Then s2.SetSize 5, 6 '调整序号宽高
sw = s2.SizeWidth '获取序号宽度
s2.LeftX = x1 - sw / 2 '调整序号位置 x 方向
Next
MsgBox i - 1
End Sub