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
IManagedConstraint AddByiMateAndEntity(
string constraintName,
ComponentArgument component1,
string iMateName1,
ComponentArgument component2,
string entityName,
Object entityBiasPoint = null,
bool angleEntityReversed = false
)
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:
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