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

Creo Parametric folder structure

gchampoux
1-Newbie

Creo Parametric folder structure

Is it possible to make the folder structure naming consistant for Creo Parametric (2.0)?



After Wildfire 5 (CE Pro) the folder structure for Creo is based upon the release and maintenance build.


For example, under the main install folder, there is a "Creo 2.0" sub-folder.
I assume this will change when Creo Parametric 3 comes out.
And under "Creo 2.0" there is a "Common Files" folder with a sub-folder for the maintenance release.
In my case, this is M060.



Because of toolkit plug-ins from various vendors, we use a batch file to configure things just before launching Wildfire/Creo.


The batch file looks for various files in the folder structure, and make decisions based upon what is found.


With Creo, the folder structure is a moving target.


Any recomendations on how to best deal with this?



Gerry Champoux
Williams International
Walled Lake, MI


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

You're not going to change the structure of the install folders, but you can capture the build for use downstream. We use the same batch file for all version of Pro & Creo and have a short batch file that sets certain variables for that specific version. Here's what we have in our initial launch batch file for Creo 2:

rem ** sets Pro/E version
set proe_ver=creo_2
set proe_version_number=30

rem ** set load point
set proe_load_point=C:\Program Files\PTC\Creo 2.0\

rem ** Determine the build
for /f "delims=" %%A in ('dir /a:d /b "%proe_load_point%Common Files\") do set BUILD=%%A

rem ** Set paths
set proe_text_folder=%proe_load_point%Common Files\%BUILD%\text\
set proe_executable_folder=%proe_load_point%parametric\bin\
set proe_executable=parametric.exe

It reads the build folder and incorporates it into the patch. It works fine, I've done several build upgrades in Creo 2 and the batch file has tracked right along.

Someone else had another method for capturing the build; perhaps they'll chime in as well.

--
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

There are several files that contain this information

You could look in the .psf file you will find this:
SHIPCODE=M060

Or you could look in the ptcstatus.bat file and you will find this:
set PRODIR=%cf%\Common Files\M060

I initially used the ptcstatus file, right now I'm just hard coding it.

These two lines show you how to grab the version and use it:
for /F "tokens=3 delims=\ usebackq" %%A IN (`findstr "%%cf%%" "P:\Creo 2.0\Parametric\bin\ptcstatus.bat"`)DO set CREOVERSION=%%A
xcopy P:\creo_2_Configs\loadpoint\*" "P:\Creo 2.0\Common Files\%CREOVERSION%\text" /y /r

In the first line here, I'm looking for the third field in the line that contains the word %cf%, inside of the file ptcstatus.bat

Open up a command shell and type the following to find the string in the file. Change the path as necessary to match your environment.
findstr "%cf%" "P:\Creo 2.0\Parametric\bin\ptcstatus.bat"
This will return a line like this:
set PRODIR=%cf%\Common Files\F000
Note that find string command will return multiple lines, so I chose a word that was unique to that line of the file.

The /F tells "for" to use "file token parsing" in other words, break the line up into different fields.
Tokens=3 says grab the third token or field. In this case it will be F000.
Delims=\ tells the for command to use the \ as the delimiter instead of spaces
The usebackq argument means use back quotes. This allows me to use double quotes inside the findstr command, and back quotes around the whole command.
%A is simply a place holder for the token that "for" finds. It's used to pass the string to the DO portion of the command. It can be any character.
IN( ) is telling "for" where to look. In this case the results of the find string command.
Because the string I'm looking for actually contains % signs, I have to escape them in the script with additional % signs. Hence %%cf%% & %%A
That's one of the gotcha's of batch scripting. What works on the command line may not always work in the script.
The DO portion of the command is telling the system what to do with the results. In this case I'm setting an environment variable I'm calling CREOVERSION.

In the second line I'm using the CREOVERSION variable to copy my load point configs from a safe location on my server to the load point

David Haigh

Thanks to all that replied.



Everyone confirmed that there is no way to force a consistant folder structure.


I was hoping that there might be some hidden install options to do so.


And all the solutions offerred are based on batch file scripting to find the build number.
This is what I was planning to do anyway, if a more elegant way was not found.



Thanks again!



Gerry Champoux
Williams International
Walled Lake, MI



In Reply to Gerry Champoux:



Is it possible to make the folder structure naming consistant for Creo Parametric (2.0)?



After Wildfire 5 (CE Pro) the folder structure for Creo is based upon the release and maintenance build.


For example, under the main install folder, there is a "Creo 2.0" sub-folder.
I assume this will change when Creo Parametric 3 comes out.
And under "Creo 2.0" there is a "Common Files" folder with a sub-folder for the maintenance release.
In my case, this is M060.



Because of toolkit plug-ins from various vendors, we use a batch file to configure things just before launching Wildfire/Creo.


The batch file looks for various files in the folder structure, and make decisions based upon what is found.


With Creo, the folder structure is a moving target.


Any recomendations on how to best deal with this?



Top Tags