Hello together,
I found an old thread with the same problem but without a solution
Dim m_inventorApp As Inventor.Application = Nothing m_inventorApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application") Dim oProjectManager As DesignProjectManager oProjectManager = m_inventorApp.DesignProjectManager 'Dim oProject As DesignProject Dim strWorkspacePath As String strWorkspacePath = oProjectManager.ActiveDesignProject.WorkspacePath MsgBox(strWorkspacePath) oProjectManager.ActiveDesignProject.FrequentlyUsedPaths.Add("Modelle", strWorkspacePath & "\Modelle") oProjectManager.ActiveDesignProject.FrequentlyUsedPaths.Add("Zeichnungen", strWorkspacePath & "\Zeichnungen")
How could I add the paths? The folder exists already.
Thanks
Georg
Solved! Go to Solution.
Solved by ls-4453. Go to Solution.
Hi,
After lots of trial and error with the project file and configuration of it, i came up with another approach that perfectly works for me.
I've created manually a complete project file, with a complete folder structure and saved it somewhere as a template.
I .NET i just have to copy and rename the folder and project file and place it in my project directory and activate it.
I did not solved the original problem, but i walked around it.
For new projects this is (for me) the best start and easy to manage if things changes in my project files over time.
For old project i just copy a new project over my old project with the new, correct settings.
Far more easier then programming the project file.
Hello Frederic,
To make a textfile with all the options is a workaround. I hope there is a solution from Autodesk for the problem.
Cheers
Georg
Hello Xiaodong,
when and for what versions there will be a patch? The error is also in version 2014 to 2017.
Georg
For the time being, you could also use this workaround:
Hi Georg,
Sorry for not getting back to you earlier, but there has been no update on the issue.
Since it's a very low priority (it has a workaround and not many people affected by it) it's very unlikely to be fixed for 2017.
Cheers,
Using the same logic that you write the example, do you can to write how to add a new AppearanceLibraries and/or MaterialLibraries and activate at ipj. Cause I dont nothing about the XML... thanks
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.
I think that might be possible through the Inventor API, but if not, then the best thing might be to save the project file with another name before adding the paths you need, then add the paths through the UI and save the project file with the actual name.
Then compare the two project files to see what exactly got added. Next time you could then do the same programmatically using the XML library.
@adam.nagy only I to have difficult to save the ipj via VBA after to edit it. Dont found out command or documentation exemplifying the save. Can you help?
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.
This is what I meant:
https://modthemachine.typepad.com/my_weblog/2020/02/modify-inventor-project-ipj-directly.html
However, what you are trying to do seems possible through the Inventor API as well:
https://forums.autodesk.com/t5/inventor-customization/designprojectmanager-issues-trying-to-add-libr...
This bug is still present in Inventor 2020. The workaround of editing the XML directly doesn't work because it requires all files to be closed, whereas the ProjectPaths.Add method works with files open.