Type Example

AEC Auto

Type Example

Examples:

l AecLayoutCurve

l AecMassElement


Sub Example_Type_AecLayoutCurve()

  'This example displays the spacing rule used on a selected aec layout curve object
  
  Dim obj As Object
  Dim pt As Variant
  Dim layoutCurve As AecLayoutCurve
  Dim layoutType As AecLayoutType
  Dim str As String
  
  ThisDrawing.Utility.GetEntity obj, pt, "Select a Node on an AEC Layout Curve"
  
  If TypeOf obj Is AecLayoutCurve Then
      Set layoutCurve = obj
      layoutType = layoutCurve.Type
      Select Case layoutType
        Case aecLayoutTypeAutoSpacingBay
            str = "Bay Spacing"
        Case aecLayoutTypeAutoSpacingEven
            str = "Even Spacing"
        Case aecLayoutTypeManualSpacing
            str = "Manual Spacing"
      End Select
        
      MsgBox "Layout rule is: " & str, vbInformation, "Type Example"
  Else
      MsgBox "Not a AEC Layout Curve", vbExclamation, "Type Example"
  End If

End Sub

Sub Example_Type_AecMassElement()

'This example shows the type of mass element

    Dim object As Object
    Dim mass As AecMassElement
    Dim count As Integer
    
    'initalize
    count = 0
    
    For Each object In ThisDrawing.ModelSpace
    
        If TypeOf object Is AecMassElement Then
            count = count + 1
            Set mass = object
            
            Select Case mass.Type
            Case aecMassElementTypeArch
                MsgBox "Mass Element " & count & " Type: Arch", vbInformation, "Type Example"
            Case aecMassElementTypeBarrelVault
                MsgBox "Mass Element " & count & " Type: Barrel Vault ", vbInformation, "Type Example"
            Case aecMassElementTypeBox
                MsgBox "Mass Element " & count & " Type: Box", vbInformation, "Type Example"
            Case aecMassElementTypeCone
                MsgBox "Mass Element " & count & " Type: Cone", vbInformation, "Type Example"
            Case aecMassElementTypeCylinder
                MsgBox "Mass Element " & count & " Type: Cylinder", vbInformation, "Type Example"
            Case aecMassElementTypeDome
                MsgBox "Mass Element " & count & " Type: Dome", vbInformation, "Type Example"
            Case aecMassElementTypeDoric
                MsgBox "Mass Element " & count & " Type: Doric", vbInformation, "Type Example"
            Case aecMassElementTypeExtrusion
                MsgBox "Mass Element " & count & " Type: Extrusion", vbInformation, "Type Example"
            Case aecMassElementTypeGable
                MsgBox "Mass Element " & count & " Type: Gable", vbInformation, "Type Example"
            Case aecMassElementTypeIsoscelesTriangle
                MsgBox "Mass Element " & count & " Type: Isosceles Triangle", vbInformation, "Type Example"
            Case aecMassElementTypePyramid
                MsgBox "Mass Element " & count & " Type: Pyramid", vbInformation, "Type Example"
            Case aecMassElementTypeRevolution
                MsgBox "Mass Element " & count & " Type: Revolution", vbInformation, "Type Example"
            Case aecMassElementTypeRightTriangle
                MsgBox "Mass Element " & count & " Type: Right Triangle", vbInformation, "Type Example"
            Case aecMassElementTypeSphere
                MsgBox "Mass Element " & count & " Type: Sphere", vbInformation, "Type Example"
            End Select
            
        End If
        
    Next
    
    If count = 0 Then
        MsgBox "No Mass Elements Present in Drawing", vbInformation, "Type Example"
    End If

End Sub