Using Inventor File Dialog to Open/Save

By Augusto Goncalves

Basically this FileDialog object must be initiated by the Inventor Application, then we just need to configure some parameters and finally show to save or to open.

If the MultiSelectEnabled is set to true for ShowOpen, then the FileName property will return a string with files separated by | character, where the String.Split method can generate the list of files.

Public Sub CreateFileDialog()

  ‘ create the file dialog

  Dim oDLG As FileDialog = Nothing

  m_inventorApplication.CreateFileDialog(oDLG)

 

  ‘ configure

  oDLG.FileName = "C:\Temp\Temp.ipt"

  oDLG.Filter = "Inventor Part Files (*.ipt)|*.ipt"

 

  oDLG.ShowSave() ‘ to save files

  oDLG.ShowOpen() ‘ to open files

End Sub


Comments

2 responses to “Using Inventor File Dialog to Open/Save”

  1. How can i get the folderpicker?

  2. Hi Henrik,
    I don’t believe this is available as a built-in form inside Inventor, but you can definitely use the .NET FolderBrowsingDialog
    Regards,
    Augusto Goncalves

Leave a Reply to Augusto GoncalvesCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading