Message 1 of 2
Error when creating an adaptive work plane for an occurrence in assembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone,
I am trying to create an adaptive work plane for an occurrence from a selected face of a different occurrence in the assembly context.
g_inventorApplication = Marshal.GetActiveObject("Inventor.Application") _assemblyDoc = g_inventorApplication.ActiveDocument Dim _assemblyDef As Inventor.AssemblyComponentDefinition _assemblyDef = _assemblyDoc.ComponentDefinition Dim _toFace As Object _toFace = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select a end face") Dim _occs As Inventor.ComponentOccurrences _occs = _assemblyDef.Occurrences Dim _occ As Inventor.ComponentOccurrence _occ = _occs.Item(1) Dim _partDef As Inventor.PartComponentDefinition _partDef = _occ.Definition Dim _defineLengthPlane As Inventor.WorkPlane _defineLengthPlane = _partDef.WorkPlanes.AddByPlaneAndOffset(_toFace, 0, False) _defineLengthPlane.Adaptive = True _occ.Adaptive = True
Error
Please help me in this case.
Many thanks.
Ngoc Son
Autodesk User
Autodesk User