试试下面的程序,应该行的。。。
Private Type MyPoint X As Double Y As Double Z As Double End Type
Sub main() Dim Point() As MyPoint, curPoint As Variant, start As Boolean ReDim Point(0) As MyPoint start = True Do On Error Resume Next curPoint = ThisDrawing.Application.ActiveDocument.Utility.GetPoint If Err Then Err.Clear: Exit Do If start = False Then ReDim Preserve Point(UBound(Point) + 1) Point(UBound(Point)).X = curPoint(0) Point(UBound(Point)).Y = curPoint(1) Point(UBound(Point)).Z = curPoint(2) start = False Loop End Sub |