I have a list of node numbers in a CSV file. I would like to create a named selection with the node numbers, so that I can visualize where are these nodes located at the mesh.
Is this possible with Mechanical Scripting?
nodeIDs = [1,3,9] ns = ExtAPI.DataModel.Project.Model.AddNamedSelection() ns.ScopingMethod = ns.ScopingMethod.Worksheet for nodeID in nodeIDs: criterion=Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion() criterion.Action= criterion.Action.Add criterion.EntityType = criterion.EntityType.MeshNode criterion.Criterion = criterion.Criterion.NodeNumber criterion.Operator = criterion.Operator.Equal criterion.Value = nodeID ns.GenerationCriteria.Add(criterion) ns.Generate()