Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACT script: Parametric Study-NamedSelection update when the geometry changes-DesignModeler

Status
Not open for further replies.

BriamV

Mechanical
May 27, 2020
1
0
0
PE
What is the way to create a NamedSelection that updates when the geometry changes?

I know how to create NamedSelection, the problem is when some geometric parameter changes and then another NamedSelection is created and the previous NamedSelection remains there, only a caution message appears since the edges that were part of the Named Selection no longer exist or are They changed their position, now I don't know how to solve that problem.

The procedure I am doing is as follows

-----------------------------------

def aftergenerate(feature):

Bodyy = ExtAPI.DataModel.GeoData.Bodies

inlett = Bodyy [0] .Edges [1]

ExtAPI.SelectionManager.NewSelection ([inlett])

named_selection = ExtAPI.DataModel.FeatureManager.CreateNamedSelection ()

named_selection.Name = "Inlet"

ExtAPI.SelectionManager.ClearSelection ()

-------------------------------

that is why when a parameter changes, a new NamedSelection is created. I don't know how to make the NamedSelection adapt to the modified geoemtry.
 
Status
Not open for further replies.
Back
Top