Defining the Named Selection Worksheet

To create a Named Selection and set its scoping to the Worksheet, you execute these commands:

sel = Model.AddNamedSelection()
sel.ScopingMethod=GeometryDefineByType.Worksheet
sel.Name = "Pipe"
pipews = sel.GenerationCriteria

When executed, this sample code creates the named selection object, renames it "Pipe," and automatically sets the Define By to Worksheet. It also stores a variable of the NamedSelectionCriteria object that can be used to manipulate the data in the worksheet.

Further Worksheet specifications are required to completely define the Named Selection.