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

Search path config issue

John.Pryal
12-Amethyst

Search path config issue

Hello all, anyone have any idea why a search path config option keeps defaulting back to (null). This option worked fine, finding the directory it pointed to, in older versions of Creo, but in Creo 3 it keeps defaulting to (null). I keep opening my config file, i locate the search path option, i browse to the specific directory, i save the config file. All seems ok until i close out the session. When i fire up Creo 3 again, the option displays (null). Very weird. Any ideas?

Regards

John


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions
BenLoosli
23-Emerald II
(To:John.Pryal)

Try creating a search.pro file with your folder locations in it. Then replace Search_Path with Search_Path_File and point to the location of the search.pro. Use the full path name to the file!

SEARCH_PATH_FILE c:\creo_configs\search.pro

See if this helps.

View solution in original post

22 REPLIES 22
BenLoosli
23-Emerald II
(To:John.Pryal)

Try creating a search.pro file with your folder locations in it. Then replace Search_Path with Search_Path_File and point to the location of the search.pro. Use the full path name to the file!

SEARCH_PATH_FILE c:\creo_configs\search.pro

See if this helps.

Thanks for your reply. I am experiencing some very weird behaviour here. I come into work today, & suddenly my search_path option appears to work fine, like it has done for years. Its worth mentioning, that I only started seeing this since installing M70 date code recently. I am having issues printing my drawings since updating too. If this falls down again, I will try your suggestion, but for now it appears to be ok.

Regards

John

Hi Ben, something is clearly not right here. My search_path config option has started defaulting back to (null) again. I have tried your suggestion, but could not get it to work either. Could i ask you what a typical search.pro file might look like? I copied the folder location into a word document, but i am not sure if that is enough. Creo has created its own search path option in my config.pro file, & when i look at that the full path name starts with a $ symbol. I tried that too, still no joy. Any help would be greatly appreciated.

Regards

John

Hi,

please upload your config.pro for investigation purposes.

MH


Martin Hanák

Hi Martin, file attached.

Regards

John

Hi,

line no.1 ... search_path_file $CREO_COMMON_FILES\afx\parts\prolibrary\search.pro ... contains paths related to AFX models

line no.198 ... search_path (null) ... nonsense

line no.208 ... search_path (null) ... nonsense

... your config.pro does not contain any search path to your custom directories.

MH


Martin Hanák

Hi Martin, that is the point, I don't have a valid search path to my custom directories. I set the search path directories I require in my config.pro file, save it, & it appears to work ok while it that Creo session, but if I exit that session, then re-launch Creo, then the search_path option now shows (null). Somehow it rewrites the value. I have had these search.pro options for years, never had any problems, until now.

One other thing worth mentioning, line no.1, search_path_file $CREO_COMMON_FILES...........etc. I have no idea where that came from or what it is pointing to, Creo must create this option by itself, because I didn't add it.

Regards

John

Try modifying the config.pro file directly in notepad or any non-rich-text editor, instead of using the Creo UI.

John.Pryal
12-Amethyst
(To:James62)

Thanks for the reply. I already tried that, using wordpad, same outcome. Is wordpad a non-rich-text editor? I don't know. I will give it a go using notepad. I am just wondering whether I should built a new config.pro from scratch in Creo 3. I know I did this when I made the move from Wildfire 5 to Creo 2 because so many of my mapkeys no longer worked. I think this same file was copied to create my Creo 3 config.pro & quite a few of my mapkeys stopped working here too, I had to re-record them. What I noticed when opening the config file in wordpad, was how long it was. I could be wrong, but it appears when you edit a mapkey, that it does not overwrite it but creates new lines of text while leaving all the old lines there. Can it be purged somehow? or do you have to manually tidy up these config files?

Regards

John

John,

if you need tidy up config.pro file content, do it manually using Notepad (I use Notepad++).

MH


Martin Hanák
BenLoosli
23-Emerald II
(To:MartinHanak)

I have seen users who create a lot of their own mapkeys get 2K+ line config.pro files because they save the current in memory config settings to their local config.pro.

Config.pro just writes these lines to the end of the existing file and saves it. I have found 5 or more duplicated sections and can usually trim a user file down to under 100 lines by removing the duplicates.

I recommend using Notepad++. I've uploaded a syntax highlighter for *.pro files in the other thread of mine.

One question. Do all these paths that contain spaces actually work in Creo 3.0? My guess is that if you feed search_path config with a path that contains spaces you get (null), because it makes no sense.

John.Pryal
12-Amethyst
(To:James62)

I have used notepad to modify my search_path option & it appears to be holding steady. I have opened & closed Creo several times now & Creo finds the directories I require. As an experiment I have just modified a config option & saved the chance through Creo UI, guess what? The search_option defaults back to (null). So I tried something else. I renamed the directory I want Creo to find, taking out the spaces, it makes no difference, if I save the config through the Creo UI it defaults to (null). This is indeed odd behaviour. Creo/elements pro works fine with this option, finds the target directory no problem. I guess I will just have to live with things the way they are, set the config value in notepad every time it defaults back.

Thanks everyone.

Dale_Rosema
23-Emerald III
(To:John.Pryal)

I always make a copy of the config.pro before editing it (e.g. 20160711config.pro). If there is something that goes crazy during editing, I can always go back the latest one before the editing.

StephenW
23-Emerald II
(To:Dale_Rosema)

Haha, I just looked. I have 8 various copies of my config.pro tucked away for safekeeping.

I understand your frustration that something that used to work fine no longer does so; but being pragmatic, what's your objection to using a separate search.pro?  Unless it changes the search path file setting, that leaves nothing for Creo to mess up in config.pro, and it's a 'cleaner' file to edit.

Hi Jonathan, I am not sure I fully understand your question. I have no objection whatsoever to using a separate search.pro, if it solves my problem, but what do you mean by a separate search.pro? Do you mean another config.pro file with just this option in it? If this is the case, how do you force Creo to load more than one config file at a time (automatically) upon start up? My config file is stored in my load point directory, I just created a second config file in there, but Creo appears to ignore it.

Regards

John

Ah - didn't realise you weren't aware of this!

In config.pro:

search_path_file n:\proestuff\search.pro

Then create a search.pro which is just a list of folders, optionally with !comment lines:

! Search path file

! Fastener folders:

n:\screws

n:\nuts

n:\washers

! Project folders

n:\widget

n:\thingumajig

! etc...

I'm not sure whether you can have blank lines - all our 'blank' lines have a '!', but then our config files are ancient...

If you want a whole tree of folders, you can auto-generate the list from a command prompt:

dir /s /b /o:n /ad > search.pro

I see. I was aware of this already, only because Ben suggested the same thing earlier in the post. I have tried this several times, but I cannot get it to work either, it seems so simple, yet it won't work. I have tried everything I can think of, I renamed the target folder, to eliminate spaces, you thought that might be a problem, still no joy. I don't know where to go from here, everything works fine in Creo/elements pro. I have Creo 2 installed also, I might spend a few minutes configuring this the same way, just to see if I run into the same kind of problems. Thanks for all your help thus far.

John

I have managed to get the search_path_file working. I noticed that when done through the Creo UI the system put the path name between quotes, eg. "c:\standard_models". Before, I copied the path name into the search.pro file without quotes, this obviously matters. I am not great when it comes to this kind of thing, I know a little. Anyway, for the time being, Creo finds the folders I need it to find. I have given up trying to get the search_path option to work on its own, perhaps James is right & this is a bug, perhaps my config.pro file is just messed up, I simply don't know. I will credit Ben with the correct answer as he mentioned it first. Thanks again for all your help.

John       

I see. Looks like it's actually a bug of Creo 3.0 or at least the subversion you use.

For some reason I always use notepad or notepad++ to edit config.pro directly and never edit it via the Creo UI. Now i realize why i do that.

EDIT: Btw, i don't really know if wordpad is a rich text editor or not, i guess it is that's why i stay away from it. A simple google search might have a better answer.

BenLoosli
23-Emerald II
(To:John.Pryal)

A sample search.pro file would look like this.

p:\vendors\cummins\model

p:\vendors\detroit\model

p:\vendors\duetz\model

p:\vendors\kubota\model

p:\vendors\skf\model

plus whatever other directories you have parts located in.

In config.pro, you would have: search_path_file c:\ptc_user\search.pro

Since you have $CREO_COMMON_FILES\afx\parts\prolibrary\search.pro, try to open a command window and then CD $CREO_COMMON_FILES to see if it can find the folder structure. You may be better off hardcoding the $CREO_COMMON_FILES location as h:\engineering or whatever it actually is instead of using the variable.

I have found that PTC coders do not always use variable translation code when do OS functions.

Top Tags