Click or drag to resize

IManagedConstraintsAddByiMateAndEntity Method

Adds or modifies a constraint between an iMate and an entity.

Namespace:  Autodesk.iLogic.Interfaces
Assembly:  Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 23.0
Syntax
Function AddByiMateAndEntity ( 
	constraintName As String,
	component1 As ComponentArgument,
	iMateName1 As String,
	component2 As ComponentArgument,
	entityName As String,
	Optional entityBiasPoint As Object = Nothing,
	Optional angleEntityReversed As Boolean = false
) As IManagedConstraint

Parameters

constraintName
Type: SystemString
The constraint name.
component1
Type: Autodesk.iLogic.TypesComponentArgument
The occurrence that contains the iMate. Examples: "Part:1" or {"Subassembly:1", "Part:1"}.
iMateName1
Type: SystemString
The iMate name.
component2
Type: Autodesk.iLogic.TypesComponentArgument
The occurrence that contains the entity. Examples: "Part:2" or {"Subassembly:2", "Part:2"}.
entityName
Type: SystemString
The entity name. This can be named or work geometry.
entityBiasPoint (Optional)
Type: SystemObject
Helps in determining the initial position of the second occurrence.
angleEntityReversed (Optional)
Type: SystemBoolean
Used when creating an angle constraint. This argument specifies if the direction of the entity should be reversed or not.

Return Value

Type: IManagedConstraint
The constraint. This will contain an iMateResult, which in turn references one or more AssemblyConstraint objects. The type of the constraint(s) is determined by the type of the iMates.
See Also