Hi, I have an ordinary geometry. This geometry has to be updated in a specified timestep interval. I want to generate a script (using the Automation Tab in Ansys Meshing). Everything works fine: the sizing, inflation, and mesh generation commands work great without an error when running the script for any new Ansys Meshing project. However, the named selections are not generated for any boundaries. I've followed this path for generating named selections to be written in the Scripting Window: Model -> Named Selection -> Geometry Selection (I selected the edges there).

I keep getting this error:

'NoneType' object has no attribute 'Location'

The code written in the Scripting Window while recording reads:

Code:

#region UI Action

named_selection_1 = DataModel.GetObjectById(29)

selection =ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)

selection.Ids = [9]

named_selection_1.Location = selection

#endregion

Any help would be greatly appreciated.

More Ehsan Bakhtiari's questions See All
Similar questions and discussions