Skip to main content
13-Aquamarine
November 18, 2022
Solved

CHOOSE BETWEEN MULTIPLE CONFIG SUP WHILE STARTING CREO

  • November 18, 2022
  • 3 replies
  • 3560 views

Hi,

 

I am looking for an option, if any, to choose between multiple config.sup files while starting Creo.

The scenario is we work for both 2 different companies A and B. Both have their own set of config requirements.

so, is it possible to have 2 separate config.sup files each company a piece and then be able to choose one among these while starting Creo??

@MartinHanak @VladimirN @TomU 

Best answer by pausob

See, for example multiple-choices-menu-on-batch-file 

 

I've adapted the example by David Ruhmann in the link above to your scenario, see if it's something you can use: 

:: Hide Command and Set Scope
@echo off
setlocal EnableExtensions

:: Customize Window
title Creo Configurations

:: Menu Options
:: Specify as many as you want, but they must be sequential from 1 with no gaps
:: Step 1. List the Application Names
set "App[1]=Creo for company A"
set "App[2]=Creo for company B"

:: Display the Menu
set "Message="
:Menu
cls
echo.%Message%
echo.
echo. Menu
echo.
set "x=0"
:MenuLoop
set /a "x+=1"
if defined App[%x%] (
 call echo %x%. %%App[%x%]%%
 goto MenuLoop
)
echo.

:: Prompt User for Choice
:Prompt
set "Input="
set /p "Input=Select configuration:"

:: Validate Input [Remove Special Characters]
if not defined Input goto Prompt
set "Input=%Input:"=%"
set "Input=%Input:^=%"
set "Input=%Input:<=%"
set "Input=%Input:>=%"
set "Input=%Input:&=%"
set "Input=%Input:|=%"
set "Input=%Input:(=%"
set "Input=%Input:)=%"
:: Equals are not allowed in variable names
set "Input=%Input:^==%"
call :Validate %Input%

:: Process Input
call :Process %Input%
goto End


:Validate
set "Next=%2"
if not defined App[%1] (
 set "Message=Invalid Input: %1"
 goto Menu
)
if defined Next shift & goto Validate
goto :eof


:Process
set "Next=%2"
call set "App=%%App[%1]%%"

:: Run Installations
:: Specify all of the installations for each app.
:: Step 2. Match on the application names and perform the installation for each
if "%App%" EQU "Creo for company A" goto AppA
if "%App%" EQU "Creo for company B" goto AppB

:: Prevent the command from being processed twice if listed twice.
set "App[%1]="
if defined Next shift & goto Process
goto :eof


:AppA
echo Running Creo configured for Company A
copy company_a.sup "C:\ptc\creo4\Creo 4.0\M150\Common Files\text\config.sup"
"C:\ptc\creo4\Creo 4.0\M150\Parametric\bin\parametric.exe"
goto End

:AppB
echo Running Creo configured for Company B
copy company_b.sup "C:\ptc\creo4\Creo 4.0\M150\Common Files\text\config.sup"
"C:\ptc\creo4\Creo 4.0\M150\Parametric\bin\parametric.exe"
goto End

:End
endlocal
pause >nul

 

Paste the above code into a text editor, adapt to your situation (your specific installation and where the your .sup files are kept) and save to a file with CMD  extension.  If you save this file to your Desktop, then you can just double-click on it and then be presented with the menu.

 

If you don't know about what I'm saying, then you have to read up on scripting - or go seek help elsewhere in your organization as this is basic stuff your CAD administrator should be able to do for you...

3 replies

24-Ruby III
November 18, 2022

@Deepakjohsh wrote:

Hi,

 

I am looking for an option, if any, to choose between multiple config.sup files while starting Creo.

The scenario is we work for both 2 different companies A and B. Both have their own set of config requirements.

so, is it possible to have 2 separate config.sup files each company a piece and then be able to choose one among these while starting Creo??

@MartinHanak @VladimirN @TomU 


Hi,

the simplest solution = 2 separate Creo installations.

company A ... install dir C:\PTC\Creo7_050_A, PTC_WF_ROOT=C:\PTC\PTC_WF_ROOT_Creo7_050_A

company B ... install dir C:\PTC\Creo7_050_B, PTC_WF_ROOT=C:\PTC\PTC_WF_ROOT_Creo7_050_B

13-Aquamarine
November 18, 2022

Really? The "simplest solution" for loading ONE different text file at start-up is bloating your drive with dual installations??? Wow.... 

 

(not your fault of course, Martin, I'm just stunned...)

---------------

Idea for someone to post: Possibility to have a config in your Session root folder. So whenever your change session, a different config is loaded. 

24-Ruby III
November 18, 2022

@EdvinTailwind wrote:

Really? The "simplest solution" for loading ONE different text file at start-up is bloating your drive with dual installations??? Wow.... 

 

(not your fault of course, Martin, I'm just stunned...)

---------------

Idea for someone to post: Possibility to have a config in your Session root folder. So whenever your change session, a different config is loaded. 


Hi,

just comment ... imagine (1) you are designer working for N companies. (2) Every company uses specific Creo version.

What is the result ? ... You must have N Creo installations on your disk.

23-Emerald IV
November 18, 2022

Starting in Creo 9.0 you have an optional, second location where the config.sup file can be stored, and this could easily be configured during startup using an environment variable in the .psf or .bat file.  See my comments here:

https://community.ptc.com/t5/System-Administration/Pointing-Creo-at-shared-config-pro-file/m-p/835320/highlight/true#M28669

 

13-Aquamarine
November 18, 2022

Hi Tom,

 

Thanks for your reply.

Sadly, we are using still using CREO 7.0.3.
but thanks for letting me know about the new Environment variable, I'll certainly make use of it when we upgrade.

23-Emerald III
November 18, 2022

See my reply in the same thread that Tom referenced.

Do you really need separate config.sup files for each installation? Could you do it with a unique config.pro for each company?

13-Aquamarine
November 18, 2022

Hi Ben,

Thanks for your reply. 
Yes, I think we do need 2 different Config.sup, because these are supplied by our clients themselves.

To give you a gist, one of the clients is from United states while the other is from Europe.
I think you can imagine the number of parameters they control using the .sup file.

Also, these Config.sup files are controlled and regulated by our clients themselves.