Error when creating an adaptive work plane for an occurrence in assembly

Error when creating an adaptive work plane for an occurrence in assembly

ngocson8335
Advocate Advocate
283 Views
1 Reply
Message 1 of 2

Error when creating an adaptive work plane for an occurrence in assembly

ngocson8335
Advocate
Advocate

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

screenshot_1579420708.png

Please help me in this case.

Many thanks.

Ngoc Son
Autodesk User
0 Likes
284 Views
1 Reply
Reply (1)
Message 2 of 2

bradeneuropeArthur
Mentor
Mentor

Addaptivity within an assembly for the same part, with two different references is not possible!

Is this what you are doing?

Than it is not possible.

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes