Hello!
I can use the following Code Snippet script to create a single label at a specific X,Y,Z-location:
labels_manager = Graphics.LabelManager
result = Tree.FirstActiveObject
with Transaction():
_old = labels_manager.GetObjectLabels(result)
Graphics.LabelManager.DeleteLabels(_old)
probe_label = labels_manager.CreateProbeLabel(result)
point = Ansys.Mechanical.Graphics.Point([-142.835450,176.906526,105.497730],'mm')
probe_label.Scoping.XYZ = point
#probe_label.Note = "NULL"
probe_label.Color = Ansys.ACT.Common.Graphics.Color(red=255, green=255, blue=255, alpha=100)
I want to make this stronger by being able to loop through a set of points in an array and assign a label to each one. How can I edit the snippet to do this?