How do I create an annotation using ACT?

Aria
Aria Member, Employee Posts: 67
25 Answers 25 Likes 10 Comments First Anniversary
✭✭✭✭
edited October 2023 in Structures

I want to create an annotation at a certain coordinate, displaying some text. How do I proceed?

Tagged:

Best Answer

  • Aria
    Aria Member, Employee Posts: 67
    25 Answers 25 Likes 10 Comments First Anniversary
    ✭✭✭✭
    edited October 2023 Answer ✓

    We can create an annotation without user interaction through Graphics.Scene:

    annotStr = r"This is my String" 
    """
    The coordinates below should be in the geometry units 
    (DataModel.GeoData.Unit)
    """
    coor = [0,0,0] 
    
    Point3D = ExtAPI.Graphics.CreateWorldPoint 
    Pt = Point3D(coor[0], coor[1], coor[2])    
    Label = ExtAPI.Graphics.Scene.Factory2D.CreateText(Pt, str(annotStr))
    """Hex color = black is used below (0x000000)"""
    Label.Color = 0x000000    
    Label.Highlight(100,100)
    

Answers

  • Philipp_92
    Philipp_92 Member Posts: 4
    First Anniversary Name Dropper First Comment
    **

    Hi,

    Is there a way to adjust the text size and line width? The line width property is available, but does not seem to cause any change.