- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Guys,
I want to adjust a code that retrieves the names of the iMates that has been set in a constraint.
I am using parts called RHS_O and RHS_1.
The following is a constraint called SC and the "Bottom" and "Left" are iMates between the part:
Constraints.AddByiMates("SC", "RHS_0:1", "Bottom", "RHS_1:1", "Left")
The code so far:
Dim doc As AssemblyDocument = ThisApplication.ActiveDocument
Dim face1 As Face = ThisApplication.CommandManager.Pick(
SelectionFilterEnum.kPartFaceFilter, "Select Face1")
Dim face2 As Face = ThisApplication.CommandManager.Pick(
SelectionFilterEnum.kPartFaceFilter, "Select Face1")
Dim occ1 As ComponentOccurrence = face1.Parent.Parent
Dim occ2 As ComponentOccurrence = face2.Parent.Parent
Dim faceProxie1 As FaceProxy = Nothing
Dim faceProxie2 As FaceProxy = Nothing
occ1.CreateGeometryProxy(face1, faceProxie1)
occ2.CreateGeometryProxy(face2, faceProxie2)
doc.ComponentDefinition.Constraints.AddMateConstraint(faceProxie1, faceProxie2, "FlushParameterDistance = 10mm")
Now i would like to get the names of the faceProxies1 and faceProxies1
MessageBox.Show(faceProxie1.Name???, "Title")
In this case the proxynames should be "Bottom".
Help is much appreciated :).
Solved! Go to Solution.