TextOffsetAbove Example

Land Auto

TextOffsetAbove Example

Sub Example_TextOffsetAbove()
    
    ' This example returns the TextOffsetAbove setting for the
    ' first CurveText object in a selection set
    
    On Error Resume Next
    
    ' Delete existing SelectionSet
    ThisDrawing.SelectionSets("SSet").Delete
    
    ' Create the selection set based on a point selection
    ' and filter for CurveText objects
    Dim ssetObj As AcadSelectionSet
    Set ssetObj = ThisDrawing.SelectionSets.Add("SSet")
    
    Dim gpCode(0) As Integer
    Dim dataValue(0) As Variant
    
    gpCode(0) = 0
    dataValue(0) = "AEC_CURVETEXT"
    
    Dim groupCode As Variant
    Dim dataCode As Variant
    
    groupCode = gpCode
    dataCode = dataValue
    ssetObj.SelectOnScreen groupCode, dataCode
    
    Dim objCrvTxt As AeccCurveText
    Set objCrvTxt = ssetObj.Item(0)
    
    MsgBox "The setting for TextOffsetAbove is: " & objCrvTxt.TextOffsetAbove , vbInformation, "TextOffsetAbove Example"
    
End Sub