Inventor File Dialog

Inventor File Dialog

SoeGranops
Contributor Contributor
509 Views
2 Replies
Message 1 of 3

Inventor File Dialog

SoeGranops
Contributor
Contributor

Hi,

I created an Addin for replacing the reference of a derived Part with Inventor and Vault 2018. It works fine for the File System. For this I need the InsertMode = True. When I'm now trying to get the File from Vault and therefore setting ShowQuickLaunch=True it's not possible taking a File from Vault. 

The Quicklaunch to Vault only works when the InsertMode is set to False. But I don't need the openMode.

Is there a solution for this?

Sönke Granops
Consultant


CIDEON Software & Services GmbH & Co. KG
0 Likes
Accepted solutions (1)
510 Views
2 Replies
Replies (2)
Message 2 of 3

sajith_subramanian
Autodesk Support
Autodesk Support
Accepted solution

Hi @SoeGranops,

 

That is as designed. If you take a look at the API help for ShowQuickLaunch property, it says "When the dialog is in insert mode the quick launch controls will be always hidden, so to show the quick launch controls the InsertMode should be set to False also."

http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-6FE9A70B-E40C-43C5-AD0E-80FFB828C007

 

As a workaround, you can call the Replace command using code as shown below:

ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyReplaceCmd").Execute

This will also launch a Dialog that would have an option to Browse a file from Vault.

 

For testing, I used the below VB code snippet to select a component occurrence and call the replace command on it. Maybe you could use it for reference:

 

Sub main()
  Dim oDoc As Inventor.AssemblyDocument
   Set oDoc = ThisApplication.ActiveDocument
   Dim oCompDef As Inventor.ComponentDefinition
   Set oCompDef = oDoc.ComponentDefinition
   Call ThisApplication.CommandManager.DoSelect(oCompDef.Occurrences.Item(1))
   ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyReplaceCmd").Execute
End Sub

 

 

Hope this helps.

 

Regards,

Sajith 


Sajith Subramanian
Autodesk Developer Network
Message 3 of 3

SoeGranops
Contributor
Contributor

Thank you very much, 

I think the solution won't work because I need it for derived parts. 

But now I know that there is no fault.

Sönke Granops
Consultant


CIDEON Software & Services GmbH & Co. KG
0 Likes