cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How to delete all options temporarily imported to current session from a config.pro file?

Hidetaka
14-Alexandrite

How to delete all options temporarily imported to current session from a config.pro file?

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!

11 REPLIES 11
StephenW
23-Emerald II
(To:Hidetaka)

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**😀

Hidetaka
14-Alexandrite
(To:StephenW)

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.  

StephenW
23-Emerald II
(To:Hidetaka)

As far as I know, you can only add search paths during a session. You can not remove a search path once it has been added.

 

 

 

Hidetaka
14-Alexandrite
(To:StephenW)

Sorry I don't really understand what you mean. I think manually deleting search path is simple.

Hidetaka_0-1637155059796.png

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.

StephenW
23-Emerald II
(To:Hidetaka)

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.

Hidetaka
14-Alexandrite
(To:StephenW)

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.)

StephenW
23-Emerald II
(To:Hidetaka)

No, it works the same as a search path. Once loaded, the path is not removable in Creo until you close Creo.

Hidetaka
14-Alexandrite
(To:StephenW)

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.

kdirth
20-Turquoise
(To:Hidetaka)

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.


There is always more to learn in Creo.
Hidetaka
14-Alexandrite
(To:kdirth)

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.

Top Tags