How do I create an annotation using ACT?
Options
![Aria](https://us.v-cdn.net/6037473/uploads/userpics/FY84DO4TOTFI/nV2OP5FPU5950.png)
Aria
Member, Employee Posts: 67
![Ansys Employee](https://us.v-cdn.net/6037473/uploads/badges/RVRDV39KPJ91.png)
I want to create an annotation at a certain coordinate, displaying some text. How do I proceed?
Tagged:
2
Answers
-
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)
2