I usually work with multiple projects at a time.
Normally, I would close a project and then open a new one. With each project, one config.pro file saved in working directory is loaded into the session.
I was thinking about "unloading" the options from a project, then change working directory and load/import the options in the new config.pro file (which is saved in the new working directory) when I need to work on another project. If it is possible to do so, I can work with multiple projects without having to close Creo and open it again. However, I could not find anyway to "unload" config options from a config file.
I understand that if I load a new config file into current session, options from the previous config file will be overwritten. However, there are many things I want to delete but will not be overwritten, for example mapkeys or search paths.
Could you please tell me whether there is a way to do that? Thank you in advance!
No. It's not the answer you want to hear. There is no "unload" ability.
Basically the "toggle" options can be changed "in session" by loading a new config.pro file but the "system" options are set when opening Creo and can't be changed "in session".
**My terminology "toggle options" and "system options" are just something I made up and not a real thing for anyone else**😀
Thank you for the reply.
If there is no "unload" option, is there a method to quickly delete all search paths in session?
Actually I can use ahk script to import only search paths from a config.pro file and ignore all other options, mapkeys, etc. So, if there is a quick way to delete all search paths in current session (or in a specific .pro file imported to the session), it would be ok.
Sorry I don't really understand what you mean. I think manually deleting search path is simple.
I can manually delete all search paths, I just think if there is a way to automatically delete all of them, it would be nice.
You can delete the search path from the config.pro (manually or automatically if you figure out how) but that does not remove the search path from the current open session of Creo. The path will be active (even though removed from the config) until the session of creo is closed. I tested this on Creo 4 just to be sure.
I didn't know that. I am using Creo 7.0, I will manually remove the search paths and see.
Do you think if I use a search.pro file and search_path_dir option, then changing that config option will remove current search paths?
(I just want to ask. At my company we don't use search_path_dir, so even if it is possible, I cannot work with past projects.)
I tried and as you said, there is no way to actually remove a search path from current session. If a directory is defined as search path, even when the search path option is deleted, Creo can still find the parts in that directory.
Here's a question that may or may not help. When you add a directory to the list of search path directories, is it added at the end of the list (i.e. it is the last place Creo looks) or at the front of the list? If it's at the front, you might be okay if you *know* the part you're looking for is in the directory you most recently added. If that's true, Creo will search for it, find it, then stop looking further. The only nasty bit will be if a part is already in session as a result of a previous assembly load.
The only method I can think of is to add all of the config settings and map keys, that you are concerned about, to each config file so that they are set to what you need. Map keys would need to be written to do nothing to, in effect, delete them.
Thank you for the reply.
It would work with options with single value, but for search paths, if I import other file the search path will just accumulate. That will cause problems because sometimes we have different parts with same name (very very rare, but sometimes it happens). For mapkeys, if the project is first created by someone other than me, I won't know the mapkeys they defined and so can not delete them by defining mapkeys with same name and do nothing.