Identify bodies in named selections and make dedicated named selections for each
I would like to have named selections for each body from given named selection, how can this be achieved through scripting?
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.
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.