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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Parameter/variable for Creo date code?

mtrautner-2
4-Participant

Parameter/variable for Creo date code?

I'd like to update my start script for Creo thus that it checks which date code version is installed on the users computer (e.g. M040, M090...)

Is there a general parameter, which i can use to do this?

Markus


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.
ACCEPTED SOLUTION

Accepted Solutions
FPerez
13-Aquamarine
(To:mtrautner-2)

hello, we are using a DOS script:(if somebody has a better way...maybe we can do an idea ?)

we install Creo in : C:\CAO\appli\Creo 2.0

The script:

SET DRIVE=C:
SET REP_CAO=%DRIVE%\CAO

IF EXIST "%REP_CAO%\Appli\Creo 2.0" SET CREO_INSTALL=%REP_CAO%\Appli\Creo 2.0

SET PARAMETRIC_INSTALL=%CREO_INSTALL%\Parametric
SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files

:: *** Récupération du release installé de Creo
PUSHD %COMMONFILES_INSTALL%
FOR /F %%a IN ('DIR /d /b') DO SET RELEASE=%%a
POPD

SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files\%RELEASE%

ECHO RELEASE: %RELEASE%
ECHO COMMON FILES: %COMMONFILES_INSTALL%

Best Regards

View solution in original post

5 REPLIES 5

Markus,

let us assume that you call something like C:\PTC\Creo 2.0\Parametric\bin\parametric.exe inside your script.

To get Creo Parametric 2.0 date code, look for the name of subdirectory of C:\PTC\Creo 2.0\Common Files directory.

Martin Hanak


Martin Hanák
FPerez
13-Aquamarine
(To:mtrautner-2)

hello, we are using a DOS script:(if somebody has a better way...maybe we can do an idea ?)

we install Creo in : C:\CAO\appli\Creo 2.0

The script:

SET DRIVE=C:
SET REP_CAO=%DRIVE%\CAO

IF EXIST "%REP_CAO%\Appli\Creo 2.0" SET CREO_INSTALL=%REP_CAO%\Appli\Creo 2.0

SET PARAMETRIC_INSTALL=%CREO_INSTALL%\Parametric
SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files

:: *** Récupération du release installé de Creo
PUSHD %COMMONFILES_INSTALL%
FOR /F %%a IN ('DIR /d /b') DO SET RELEASE=%%a
POPD

SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files\%RELEASE%

ECHO RELEASE: %RELEASE%
ECHO COMMON FILES: %COMMONFILES_INSTALL%

Best Regards

Thanks Fabrice,

that's exactly the answer i was looking for

Best Regards

Markus

THANK YOU! We have been trying to figure this out for a long time.

Also for those moving to Creo 3.0 here is the new version.

We install to C:\PTC

So the Creo 3.0 folder is install to the above location.

SET DRIVE=C:

SET REP_PTC=%DRIVE%\PTC

IF EXIST "%REP_PTC%\Creo 3.0" SET CREO_INSTALL=%REP_PTC%\Creo 3.0

:: *** Recover Creo install release

PUSHD %CREO_INSTALL%

FOR /F %%a IN ('DIR /d /b') DO SET RELEASE=%%a

POPD

SET CREO_INSTALL=%CREO_INSTALL%\%RELEASE%

SET PARAMETRIC_INSTALL=%CREO_INSTALL%\Parametric

SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files

ECHO RELEASE: %RELEASE%

ECHO COMMON FILES: %COMMONFILES_INSTALL%

Thanks for the tip and examples that others provided.

I am using the command DIR /A:D /O:N /B instead to list only folders without the full path. The /D option (Wide List format, sorted by vertical column.) only controls the output format, and does not do anything since when /B option (Bare format (no heading, file sizes or summary).) is used then the wide list format is not used. To get only directories the option should be /A:D for file attributes of folders only. To sort by name the option /O:N can be used.

Example:

:: Define where Creo is installed (typically C:\Program Files\PTC\Creo 2.0)

set CreoLoadPoint=C:\Program Files\PTC\Creo 2.0

:: Define release build version

pushd "%CreoLoadPoint%\Common Files"

for /f %%a in ('DIR /A:D /O:N /B') do set CreoBuildVersion=%%a

popd

References:

Dir - list files and folders | Windows CMD | SS64.com

Pushd - change directory/folder | Windows CMD | SS64.com

Popd | Windows CMD | SS64.com

Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags