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: 25.0
Syntax
VB
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
C#
IManagedConstraint AddByiMateAndEntity(
string constraintName,
ComponentArgument component1,
string iMateName1,
ComponentArgument component2,
string entityName,
Object entityBiasPoint = null,
bool angleEntityReversed = false
)
Parameters
- constraintName
- Type: System.String
The constraint name. - component1
- Type: Autodesk.iLogic.Types.ComponentArgument
The occurrence that contains the iMate. Examples: "Part:1" or {"Subassembly:1", "Part:1"}. - iMateName1
- Type: System.String
The iMate name. - component2
- Type: Autodesk.iLogic.Types.ComponentArgument
The occurrence that contains the entity. Examples: "Part:2" or {"Subassembly:2", "Part:2"}. - entityName
- Type: System.String
The entity name. This can be named or work geometry. - entityBiasPoint (Optional)
- Type: System.Object
Helps in determining the initial position of the second occurrence. - angleEntityReversed (Optional)
- Type: System.Boolean
Used when creating an angle constraint. This argument specifies if the direction of the entity should be reversed or not.
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