10-22-2020
02:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-22-2020
02:19 PM
I could not find a way using the api. But you could try to copy the InventorCustomization file.
Dim inventorVersion As String = "2020" Dim destinationPath As String = "c:\temp\" Dim fileName As String = "InventorCustomization.xml" Dim appdataPath As String = System.Environment.ExpandEnvironmentVariables("%APPDATA%") Dim lastPartPath As String = String.Format("Autodesk\Inventor {0}", inventorVersion) Dim fullSourcePath As String = System.IO.Path.Combine(appdataPath, lastPartPath, fileName) Dim fullDestinationPath As String = System.IO.Path.Combine(destinationPath, fileName) If (System.IO.File.Exists(fullSourcePath)) Then ' copy the customization file to a save location System.IO.File.Copy(fullSourcePath, fullDestinationPath, True) Else MsgBox("could Not find customization file") End If ' do something else ' and return the customization file to its original location System.IO.File.Copy(fullDestinationPath, fullSourcePath, True)
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com