Type Пример |
Sub Example_Type() 'Этот пример создает выноску в пространстве модели. 'Затем изменяет тип выноски. Dim leaderObj As AcadLeader Dim points(0 To 8) As Double Dim leaderType As Integer Dim annotationObject As AcadEntity points(0) = 0: points(1) = 2: points(2) = 0 points(3) = 4: points(4) = 4: points(5) = 0 points(6) = 4: points(7) = 2: points(8) = 0 leaderType = acLineNoArrow Set annotationObject = Nothing 'Создайте объект выноски в пространстве модели Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType) ZoomAll 'Найдите текущий тип выноски leaderType = leaderObj.Type MsgBox "Тип выноски " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Пример" 'Измените тип выноски leaderObj.Type = acLineWithArrow leaderObj.Update MsgBox "Тип выноски " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Пример" 'Измените тип выноски leaderObj.Type = acSplineNoArrow leaderObj.Update MsgBox "Тип выноски " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Пример" 'Измените тип выноски leaderObj.Type = acSplineWithArrow leaderObj.Update MsgBox "Тип выноски " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Пример" End Sub