In my project I have defined a Named Selection of some faces (bolt shafts) by scoping method worksheet. Now I try to get the IDs of these surfaces for being able to apply a bolt pretension to each of the faces.
If "ns" references your named selection, ns.Ids will return the ids of the geometric entities scoped in that named selection.
ns.Ids
This post should also help:
I don't think this response is correct. In Mechanical, Ansys.ACT.Automation.Mechanical.NamedSelection has no property "Ids". You will need to use:
ns.Location.Ids
@Jim Kosloski , both options work:
ns.Ids should however not be confused with ns.ObjectId. The first returns the Ids of the geometric entities scoped in the NS, whereas the later returns the ID of the NS tree object.