Property Types

Each object in the tree might have properties that display in the Details view. The APIs use a handful of types to refer to different kinds of properties. Descriptions and examples of the most common types follow.

Quantity: A real value with a unit typically related to a physical quantity.

my_object.ElementSize = Quantity("0.1 [m]")

Number (float and integer): A real or integer value.

my_object.TetraGrowthRate = 2

Boolean: Either True or False.

my_object.WriteICEMCFDFiles = True

Enumeration: A named value out of a set of possible named values.

mmesh_method.Algorithm = MeshMethodAlgorithm.PatchIndependent 

Entity Selection ((ISelectionInfo or IMechanicalSelectionInfo): A value representing a geometric or mesh selection. Some objects are valid selections (such as a Named Selection object) and can be used as values for these properties. To apply a list of entities directly, you can:

  • Create an instance of MechanicalSelectionInfo and specify the IDs.

  • Assign this instance to an entity selection property (such as Location).

my_selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
my_selection.Ids= [28,25]

My_object.Location = my_selection