ExtLine2StartPoint Пример |
Sub Example_ExtLine2StartPoint() ' Этот пример создает угловое измерение. Затем изменяет ' местоположение ExtLine2StartPoint. Dim dimObj As AcadDimAngular Dim angVert(0 To 2) As Double Dim FirstPoint(0 To 2) As Double Dim SecondPoint(0 To 2) As Double Dim TextPoint(0 To 2) As Double ' Определите измерение angVert(0) = 0#: angVert(1) = 5#: angVert(2) = 0# FirstPoint(0) = 1#: FirstPoint(1) = 7#: FirstPoint(2) = 0# SecondPoint(0) = 1#: SecondPoint(1) = 3#: SecondPoint(2) = 0# TextPoint(0) = 3#: TextPoint(1) = 5#: TextPoint(2) = 0# ' Создайте угловое измерение в пространстве модели Set dimObj = ThisDrawing.ModelSpace.AddDimAngular(angVert, FirstPoint, SecondPoint, TextPoint) ZoomAll MsgBox "Текущее значение ExtLine2StartPoint " & dimObj.ExtLine2StartPoint(0) & ", " & dimObj.ExtLine2StartPoint(1) & ", " & dimObj.ExtLine2StartPoint(2), vbInformation, "ExtLine2StartPoint Пример" ' Измените точку начала второй добавочной линии FirstPoint(0) = 1: FirstPoint(1) = 4: FirstPoint(2) = 0 dimObj.ExtLine2StartPoint = FirstPoint dimObj.Update ' Возвратите точку начала второй добавочной линии ' Обратите внимание, что возвращаемое значение - Variant Dim retPnt As Variant retPnt = dimObj.ExtLine2StartPoint MsgBox "Новое значение ExtLine2StartPoint " & dimObj.ExtLine2StartPoint(0) & ", " & dimObj.ExtLine2StartPoint(1) & ", " & dimObj.ExtLine2StartPoint(2), vbInformation, "ExtLine2StartPoint Пример" End Sub