Automatic label creation on 2D shell bodies

EnBV Member Posts: 2
Name Dropper First Comment

Hi everyone!
I am wondering how to create labels using scripting specifically on 2D shell bodies from a plot that contains both top and bottom results of shell elements.
The code is the following.

active_plots = []
active_NSs = []

for ActObj in ExtAPI.DataModel.Tree.ActiveObjects:
if ActObj.GetType() == Ansys.ACT.Automation.Mechanical.NamedSelection:

for plot in active_plots:
for NS in active_NSs:
probeLabel = Graphics.LabelManager.CreateProbeLabel(plot)
probeLabel.Scoping.Node = NS.Location.Ids[0]

Basically what I do is selecting two or more NSs containing a node reference and use this info to create labels in plots (this case is a max principal stress plot).
The tool works fine for 3D bodies. However, when having top and bottom plots showing 2D shell bodies, it always takes as reference the bottom plot position when providing a node number as scoping. In my case, this is not desirable, because stresses are way higher in the top plot position (see attached pic). I have not seen any attribute to change the plot position for label extraction from bottom to top.
I have thought of a workaround consisting of only reading both top and bottom stress values and comparing them using code before creating the label, but I don't know if that may be possible.
I would appreciate any help!