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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Clarification about drawings and their files

KrisR
1-Newbie

Clarification about drawings and their files

I had assumed the Pro worked similar to other programs when creating drawings; it had an internal link to wherever the model was stored in order to load it in the drawing.

I'm thinking this is not the case. I have a folder structure like this:

-MAIN

->PRO REFERENCE

->RE-MODEL

Pro will not find the model for the drawing contained in PRO-REFERENCE unless the working directory is set to the MAIN folder. If I have the working dir set to RE-MODEL the drawing will not find the model.

Someone please clarify for me how this d&*m program thinks in regrads to remembering where things are located.

Thanks


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

Hi Kris...

There's a specific order Creo (or Pro/E) uses to look for models upon retrieval:

  1. Models already loaded into memory ("In Session")
  2. The directory where the drawing is being loaded from. For example, with you selectthe File Open command, you can navigate to other folder to open files. If you navigate to some other folder, this "other folder" is searched.
  3. Active Windchill or Pro/INTRALINK areas:
    1. Workspace
    2. Commonspace
  4. Your Current Working Directory
  5. Search Paths defined in your config.pro and/or paths in the Search Path File defined in config.pro

What's happening here is that you need to set up your search paths. Working without Windchill or Pro/INTRALINK (also called "Wild West" style) can be tricky. Often you maintain a list of search paths to instruct Pro/ENGINEER where to look for files. For example, if you decide to put common hardware or purchased vendor items in a special folder somewhere, you'll want to add that folder to your search paths.

Search paths can be added in two ways. First, you can open up your config.pro file and add lines to it. If I recall correctly, you're running Creo Elements Pro/ 5.0. From your top menu, you can also edit your config.pro from the top menu by going to to Tools->Options. You'll add lines like this for each folder you want the system to search:

search_path "<path here>"

For example, you could add these lines to your config.pro:

search_path "c:\documents and settings\username\my documents\vendor_parts"

search_path "c:\documents and settings\username\my documents\hardware_library"

search_path "c:\documents and settings\username\my documents\hardware_library\screws"

search_path "c:\documents and settings\username\my documents\hardware_library\nuts"

search_path "c:\documents and settings\username\my documents\hardware_library\washers"

search_path "c:\documents and settings\username\my documents\hardware_library\bolts"

Instead of specifying them line-by-line in the config.pro, you can put these pathnames into one text file and reference it using the search_path_file option. Instead of multiple "search_path" statements, you just have one search_path_file statement in this format:

search_path_file "<path here>\search.pro"

For example, you could add this one line to your config.pro:

search_path_file "c:\documents and settings\username\my documents\search.pro"

Then you could have a search.pro file with these entries:

"c:\documents and settings\username\my documents\vendor_parts"

"c:\documents and settings\username\my documents\hardware_library"

"c:\documents and settings\username\my documents\hardware_library\screws"

"c:\documents and settings\username\my documents\hardware_library\nuts"

"c:\documents and settings\username\my documents\hardware_library\washers"

"c:\documents and settings\username\my documents\hardware_library\bolts"

I understand going through this process might seem hard to justify, but there is a reason. Working without Windchill, sometimes designers will work on multiple projects. You can have a different set of search paths for different projects. This restricts Pro/ENGINEER's search capabilties to certain folders rather than have it search all over the place for files.

One final note... another technique you can use is to load the model into your session memory before opening the drawing. Once you've opened the model, Pro/E will open the drawing without a problem because you're using that #1 search location from the list above.

Setting up search paths is the way to solve your problem. If this email hasn't given you enough information, you can go to the help files and search for "search_path". You'll get much more complete information there.

Thanks!

-Brian

The directory where the drawing is being loaded from. For example, with you selectthe File Open command, you can navigate to other folder to open files. If you navigate to some other folder, this "other folder" is searched

Ok - does it look through those sub-dirs as well? Or just the root dir?

Just the root directory. I know it sounds painful to list all the sub directories in the seach path file. In many cases it is but there are times you need the ability to search some folders and not others so that's why it's like that.

One nice enhancement would be to add a flag to the search path that could make it recursive. With all the emphasis on Windchill now, I think the old methods of specifying search paths have fallen off the development radar.

Unfortunately, we will never have Windchill......we've tried and talked til we are blue in the face.

TomD.inPDX
17-Peridot
(To:KrisR)

The problem I am having is that the Working Directory seems to change anytime you navigate to somewhere else including loading some arbitrary settings file.

I do have a habit of keeping drawings and models in the same folder. When you are tied to a stable part numbering system, it is easy to have a range of say 100 part number in each folder and the search path is set to those folders. Then of course, some admin person would also want to create a batch file to purge each of those folders over time.

The only thing that's been messy with this scenario is Pro/E "Backup" which would require deleting the files being put in the wrong folders.

I also use the search_path_file config option and maintain my own library of bolts and dowels this way.

Btw I see that you can have spaces in pathnames if you put the pathnames in quotation marks? That's interesting.

Hi Jakub...

Yes, if you have pathnames with spaces, you must put the entire path in double quotes. You can omit the quotes if you user pathnames that don't contain the spaces.

Thanks!

-Brian

Top Tags