ImmediateAnnotation

From scripting
Jump to: navigation, search
Sub ImmediateAnnotation(PointObj As HybridShape, TextStr As String)
    Dim PtMeas
    Dim Ccoords()
    ReDim Ccoords(2)
    Set PtMeas = theSPAWorkbench.GetMeasurable(PointObj)
    PtMeas.GetPoint (Ccoords)
 
    Dim AnnFact As AnnotationFactory
    Set AnnFact = CurAnnSet.AnnotationFactory
    Dim UserSurf As UserSurface
    Set UserSurf = UserSurfS.Generate(PointObj)
    Dim GGG As Annotation
    Set GGG = AnnFact.CreateEvoluateText(UserSurf, (Ccoords(0) * 1), (Ccoords(1) * 1), (Ccoords(2) * 1), False)    
    Set GText = GGG.Text
    GText.Text = TextStr
End Sub