IManagedConstraints Interface |
In a rule, this interface is implemented by the predefined object named Constraints (which is the same object as ThisAssembly.Contraints).
Namespace: Autodesk.iLogic.Interfaces
The IManagedConstraints type exposes the following members.
Name | Description | |
---|---|---|
AddAngle |
Adds or modifies an angle assembly constraint.
| |
AddByiMateAndEntity |
Adds or modifies a constraint between an iMate and an entity.
| |
AddByiMates |
Adds or modifies a constraint between iMates.
| |
AddFlush |
Adds or modifies a flush assembly constraint.
| |
AddInsert |
Adds or modifies an insert assembly constraint.
| |
AddMate |
Adds or modifies a mate assembly constraint.
| |
AddRotate |
Adds or modifies a rotate-rotate or rotate-translate assembly constraint.
| |
AddSymmetry |
Adds or modifies a symmetry assembly constraint.
| |
AddTangent |
Adds or modifies a tangent assembly constraint.
| |
AddTransitional |
Adds or modifies a transitional assembly constraint.
| |
AddUcsToUcs |
Adds or modifies a constraint set. This consists of three flush constraints between two items that are either User Coordinate Systems (UCS's),
component origins, or the assembly origin.
| |
Delete |
Deletes an assembly constraint.
There is no error if the constraint does not exist (maybe because it was already deleted).
|
The Add* functions use entity names to identify the elements to be constrained. Unless iMates are being used, these are either:
If you use work features or iMates, it's best to rename them. If you keep the default names, your rules may not work on a system that is using a different language pack.
The Add* functions have ComponentArgument arguments to specify the components that contain the entity to be constrained. See that topic for more details. An empty string (or Nothing) can be used for the ComponentArgument to refer to an entity (e.g. a workplane) that is not in any component but is instead in the assembly itself.
If a constraint name is specified, a constraint with that name will be created if it doesn't exist. If it does exist, the system will ensure that it meets the all the specifications in the current function call. If it already meets the specification, then no change is required. If it doesn't meet the specification, it will be modified so that it does. To do that, the system might have to delete the existing constraint and create a new one.
Many of the methods have optional biasPoint arguments. These are passed to the underlying Inventor API methods (AssemblyConstraints.AddMateConstraint etc.) with no conversion. They can be of type Inventor.Point.