Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey forum,
I am trying to constrain a part to an assembly relative to a work plane on the assembly using the API but I cannot manage to do it. I need to mate a part with a plane to an assembly plane. I know there is a sample on the programming/API section but that's to mate to another part, which is not what I am trying to do
Here's what I have written so far:
Dim oAsm As AssemblyDocument = ThisApplication.ActiveDocumento Dim oAsmComp As AssemblyComponentDefinition = oAsm.ComponentDefinition Dim oOcc As ComponentOccurrence = oAsmComp.Occurrences.Item(1) Dim oPC As PartComponentDefinition = oOcc.Definition Dim oWP As WorkPlane = oPC.WorkPlanes.Item(3) Dim oWPProxy As WorkPlaneProxy oOcc.CreateGeometryProxy(oWP, oWPProxy) Dim oAsmWP As WorkPlane '''???? confused here ''' I think i need to make a proxy for this oAsmWP ''' Just not sure since CreateGeometryProxy is a class from oOcc oAsmComp.Constraints.AddFlushConstraint(oWPProxy, oAsmWP, "")
Thanks!
Felix
Solved! Go to Solution.