Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i want to create mate for 3 face of part in assembly to quickly do my work
i have below code but it is not working
Dim asmDoc As AssemblyDocument
asmDoc = ThisApplication.ActiveDocument
Dim part1 As ComponentOccurrence
part1 = asmDoc.ComponentDefinition.Occurrences.Item(1)
Dim part2 As ComponentOccurrence
part2 = asmDoc.ComponentDefinition.Occurrences.Item(2)
Dim selectedPlane1 As WorkPlane
selectedPlane1 = ThisApplication.CommandManager.Pick(kWorkPlaneFilter, "Select the first plane")
Dim selectedPlane2 As WorkPlane
selectedPlane2 = ThisApplication.CommandManager.Pick(kWorkPlaneFilter, "Select the second plane")
Dim selectedPlane3 As WorkPlane
selectedPlane3 = ThisApplication.CommandManager.Pick(kWorkPlaneFilter, "Select the third plane")
Dim constraintGroup As GeometricConstraintGroup
constraintGroup = asmDoc.ComponentDefinition.Constraints.AddMateConstraint(part1, part2, kFlushMate, selectedPlane1, selectedPlane2, selectedPlane3)Select face
affter
Solved! Go to Solution.