Skip to main content

Mechanical scripting interface

NamedSelectionCriteria

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.NamedSelectionCriteria

Bases: object

A collection of named selection criteria.

Overview

Methods

Name Description
Add Adds the given criterion to the collection.
Clear Clears the collection.
Contains Returns whether the collection contains the given criterion.
IndexOf Returns the index of the given criterion if it exists in the collection. Returns -1 if it does not
Insert Inserts the given criterion into the collection at the given index.
Remove Removes the given criterion from the collection if it exists in the collection. Throws an exception if it does not.
RemoveAt Removes the criterion at the given index. Throws an exception if the given index is not valid.

Properties

Name Description
Count The number of criteria in the collection.
Item Item property.

Property detail

property NamedSelectionCriteria.Count : int | None

The number of criteria in the collection.

property NamedSelectionCriteria.Item : Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion | None

Item property.

Method detail

NamedSelectionCriteria.Add(criterion: Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion)

Adds the given criterion to the collection.

NamedSelectionCriteria.Clear()

Clears the collection.

NamedSelectionCriteria.Contains(criterion: Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion)

Returns whether the collection contains the given criterion.

NamedSelectionCriteria.IndexOf(criterion: Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion)

Returns the index of the given criterion if it exists in the collection. Returns -1 if it does not

NamedSelectionCriteria.Insert(index: int, criterion: Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion)

Inserts the given criterion into the collection at the given index.

NamedSelectionCriteria.Remove(criterion: Ansys.ACT.Automation.Mechanical.NamedSelectionCriterion)

Removes the given criterion from the collection if it exists in the collection. Throws an exception if it does not.

NamedSelectionCriteria.RemoveAt(index: int)

Removes the criterion at the given index. Throws an exception if the given index is not valid.