pycatia.knowledge_interfaces.optimization_constraints

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.knowledge_interfaces.optimization_constraints.OptimizationConstraints(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
OptimizationConstraints

Represents a collection of Optimization Constraint.
add_constraint(constraint_expression: str) OptimizationConstraint

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func AddConstraint(CATBSTR constraintExpression) As
OptimizationConstraint

Adds a optimization constraint. This parameter must not be read only.
Parameters:

constraint_expression (str) –

Return type:

OptimizationConstraint

item(i_index: cat_variant) OptimizationConstraint

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As OptimizationConstraint

Returns an optimization constraint using its index or its name from the
optimization constraints collection.

Parameters:

iIndex
The index or the name of the optimization constraint to retrieve
from the collection of optimization constraints. As a numerics, this index is
the rank of the optimization constraint in the collection. The index of the
first optimization constraint in the collection is 1, and the index of the last
optimization constraint is Count. As a string, it is the name you assigned to
the optimization constraint using the

AnyObject.Name property or when changing the optimization constraint
name by the property panel.
Returns:
The retrieved optimization constraint
Example:
This example retrieves the last optimization constraint in the
optimization constraints collection.

Set lastConstraint = constraints.Item(constraints.Count)
Parameters:

i_index (cat_variant) –

Return type:

OptimizationConstraint

remove_constraint(i_index: cat_variant) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub RemoveConstraint(CATVariant iIndex)

Removes a given optimization constraint using its index or its name from
the optimization constraints collection.

Parameters:

iIndex
the name of the constraint if argument is a string or the index of
the constraint if argument is an integer.
Parameters:

i_index (cat_variant) –

Return type:

None