TAGGED: Annotation, ansys2020, python
-
-
November 28, 2024 at 1:04 pm
hallinenjesse
SubscriberdefResult = ExtAPI.DataModel.Project.Model.Analyses[0].Solution.Children[1]ds=ExtAPI.DataModel.InternalObject["ds"]labelID=ds.Graphics.AddLabel(defResult.ObjectId, 520, "DeformResult", 0.024, 0.004136, 0.0082857, 0x0000ff)# Arguments are: ObjectID, classID(520 for result), X_coor, Y_coor, Z_coor, color# This just creates an annotation probe with text "DeformResult" not the value of a result at that locationExtAPI.Graphics.Redraw()ÂThe python code above works pretty well for our use case, because we only need labels with some custom text, but now I got asked if we can edit those labels some more.So basically, is it possible to:- Detect which label was clicked and get its labelID?
- Remove the line that connects the label and the Point, so that label stays in the point location like normal annotations?
- Temporary hide some of the labels?
- Or basically edit anything else than what can be seen in the above code?
-
December 2, 2024 at 5:56 pm
mrife
Ansys EmployeeHi hallinenjesse
The Ansys Developers Portal Forum is open to the public and you can ask scripting questions there: https://discuss.ansys.com/
On that forum try searching for annotations then check on the 'Community Forum' box on the upper left. Then post your questions as needed.
Mike
-
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Ansys Innovation Space
Trending discussions
- At least one body has been found to have only 1 element in at least 2 directions
- Script Error Code:800a000d
- Element has excessive thickness change, distortion, is turning inside out
- Elastic limit load, Elastic-plastic limit load
- Image to file in Mechanical is bugged and does not show text
- Help to do quasistatic analysis in static structural module
Top Contributors
-
1932
-
823
-
599
-
591
-
366
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.