Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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??
Solved! Go to Solution.
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...
@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??
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
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.
@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.
Hi Martin,
Thanks for your reply.
I apologize I didn't explicitly mention about the Versions that we use for each company.
The Version is same Creo 7.0.3.
It is more like a support for different branches of the same Company located in different continent
(Hence following completely different drawing and modelling conventions)
Comp A is US based
While Comp B is European
Well, this is actually quite specific text file, as a user can't change any of it's options through Creo - whatever is set in config.sup, is not meant to be modified in Creo session. And Creo will load only one config.sup from \text directory per startup, so duplicating Creo install folder is easiest way of using different config.sups per customer, like Martin said.
More advanced approach could be, for example a batch script, where user picks a proper option and the script copies appropriate config.sup to Creo installation directory and then starts Creo. That way you can keep one Creo instance and keep changing config.sup files during startup. I think it might be even possible with proper .psf files and RUN= sections to copy relevant config.sup during Creo startup.
Hi Lukas,
Thanks for your reply.
Yes, this is what I am looking for. To have some kind of a control to choose between the different Sup files before or while loading creo.
Would you be able to share some references on how this can be achieved please?
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...
Hello Pausob,
Perfect! This is exactly the solution I was looking for.
Thanks a ton for your help.
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:
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.
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?
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.