Inventor 2021 Constraint-related API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone, I encountered an issue: There is a component with part A and part B. Part A contains two sub-parts, A1 (A1 is a cylinder) and A2. I need to add a tangent constraint between the XZ plane of part B and the outer surface of A1. When running the code, there is no problem creating the geometry, but an error occurs when adding the tangent constraint. I would like to ask if it's possible to directly add constraint relationships between parts and sub-parts using code? (Inventor 2021 API) csharp if (occurrenceYellowOilMouthXZPlane != null && JointOutSideFace != null) { occurrenceJoint.CreateGeometryProxy(JointOutSideFace, out object oAsmPlaneHexJoint); occurrence.CreateGeometryProxy(occurrenceYellowOilMouthXZPlane, out object oAsmPlaneYellowOilMouth); assemblyConstraints.AddTangentConstraint(oAsmPlaneHexJoint, oAsmPlaneYellowOilMouth, true, 0); } occurrenceJoint: part A1 JointOutSideFace: outer surface of part A1 occurrence: part B occurrenceYellowOilMouthXZPlane: XZ plane of part B