0
我試圖根據用戶輸入製作一個領先的點,然後第二個點將在x & y之外50個單位。我認爲這個概念應該可以工作,但是我將數組50添加到數組中時遇到了問題。這就是我有和我得到一個類型不匹配:爲單個數組值添加值
Set annotationObject = Nothing
Dim StartPoint As Variant
leaderType = acLineWithArrow
Dim Count As Integer
Dim points(0 To 5) As Double
StartPoint = ACAD.ActiveDocument.Utility.GetPoint(, "Specify insertion point")
MsgBox StartPoint(0) & "," & StartPoint(1) & "," & StartPoint(2)
StartPoint(3) = StartPoint(0) + 50
StartPoint(4) = StartPoint(1) + 50
StartPoint(5) = StartPoint(2)
Set leader1 = ACAD.ActiveDocument.ModelSpace.AddLeader(StartPoint, annotationObject, leaderType)
那一行,你得到的錯誤,當你的錯誤是什麼StartPoint可以的UBOUND? –
它實際上告訴我下標超出範圍,我得到它在行StartPoint(3)= StartPoint(0)+ 50 –
我想我得到它感謝您的幫助!我在起點和點之間混合起來 –