Adds or modifies a constraint between iMates.
Namespace:
Autodesk.iLogic.Interfaces
Assembly:
Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 25.0
Syntax
VB
Function AddByiMates (
constraintName As String,
component1 As ComponentArgument,
iMateName1 As String,
component2 As ComponentArgument,
iMateName2 As String
) As IManagedConstraint
C#
IManagedConstraint AddByiMates(
string constraintName,
ComponentArgument component1,
string iMateName1,
ComponentArgument component2,
string iMateName2
)
Parameters
- constraintName
- Type: System.String
The constraint name. - component1
- Type: Autodesk.iLogic.Types.ComponentArgument
The occurrence that contains the first iMate. Examples: "Part:1" or {"Subassembly:1", "Part:1"}. - iMateName1
- Type: System.String
The first iMate name. - component2
- Type: Autodesk.iLogic.Types.ComponentArgument
The occurrence that contains the second iMate. Examples: "Part:2" or {"Subassembly:2", "Part:2"}. - iMateName2
- Type: System.String
The second iMate name.
Return Value
Type:
IManagedConstraintThe 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
Reference