-
-
October 10, 2022 at 3:23 pm
peter.greaves
SubscriberI have a script to set up my model and part of this should involve using a named selection (which came through from SpaceClaim) as the geometry for where a layered section is used. I can't find out how to use a named selection as an iSelectionInfo which is what the Location needs. I'm after something like this:
laySect = Model.Geometry.AddLayeredSection()
selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) # Create an empty selection.
selection.Entities = ? # How to use the named selection as the Entities?
laySect.Location = selectionAny help will be much appreciated!
-
October 11, 2022 at 2:15 pm
ErKo
Ansys EmployeeSay the named selection is called “MyBodyNamedSelection”
Sample code:laySect = Model.Geometry.AddLayeredSection()
ExtAPI.SelectionManager.ClearSelection()
ns = ExtAPI.DataModel.GetObjectsByName(“MyBodyNamedSelection”)
laySect.Location = ns[0]-
October 12, 2022 at 10:23 am
peter.greaves
SubscriberThat's done the trick, thanks!
-
-
October 12, 2022 at 10:43 am
ErKo
Ansys Employeehappy to help.
-
- The topic ‘Specify NamedSelection as geometry for Layered Section with ANSYS ACT’ is closed to new replies.
-
5849
-
1906
-
1420
-
1305
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.