Click or drag to resize

IManagedConstraintsAddByiMates Method

Adds or modifies a constraint between iMates.

Namespace:  Autodesk.iLogic.Interfaces
Assembly:  Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 23.0
Syntax
Function AddByiMates ( 
	constraintName As String,
	component1 As ComponentArgument,
	iMateName1 As String,
	component2 As ComponentArgument,
	iMateName2 As String
) As IManagedConstraint

Parameters

constraintName
Type: SystemString
The constraint name.
component1
Type: Autodesk.iLogic.TypesComponentArgument
The occurrence that contains the first iMate. Examples: "Part:1" or {"Subassembly:1", "Part:1"}.
iMateName1
Type: SystemString
The first iMate name.
component2
Type: Autodesk.iLogic.TypesComponentArgument
The occurrence that contains the second iMate. Examples: "Part:2" or {"Subassembly:2", "Part:2"}.
iMateName2
Type: SystemString
The second iMate name.

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