Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
To all Pro/E WF4.0 and Creo5 gurus,
Is there a way to use variables inside the paths in a config.pro file?
Example: system_colors_file c:\pro\Garland\%USERNAME%\sf\syscol.scl
This does not work. Saved the syscol.scl from inside Pro/E to have old school background. Restarted Pro/E, no beuno.
Weird thing is though, the one for trail file location works:
trail_dir c:\pro\Garland\%USERNAME%\sf
go figure
If anyone has any insight on this I would appreciate it. I just want the users to be able to store things like system colors in default user location that is specific to only them.
Thanks!
Solved! Go to Solution.
Hi Buddy...
We're definitely chasing our tails in this thread. Let me set the record straight and put this issue to bed...
First, the correct nomenclature is $USERNAME or $SYSTEM_VARIABLE where "SYSTEM VARIABLE" can be any valid DOS variable. Second, this variable works for absolutely everything...
... except for the system_colors_file option!
:Tap Tap Tap: Are you listening PTC? (That's me tapping on the screen to get their attention) You cannot use a system variable with the system_colors_file option, it simply does not work. It doesn't even work if you put the variable (or the entire path) in quotations. I've tried all manner of quotations, backquotes, and tick marks. Trust me, it's broken! Works everywhere else... doesn't work here.
So then, you're stuck with Plan B. I don't know how committed you are to making this work- but I have a solution if you're willing to work for it. First, download the attached file called load_colors.txt. This is just a small trail file that executes a few simple commands to load the color file "syscol.scl" from the user's working directory.
People tend to forget about trail files. No one uses them. They're practically useless anymore. Once upon a time they were lifesavers. Now they're just huge streams of text and cluttered, unintelligible hieroglyphics that would make a seasoned archaeologist faint. Still, they can be useful.
The second thing people tend to forget, is that it is possible to run a trail file automatically when you launch Pro/E (or Creo). All you have to do is put the path to the trail file right after the launch command! If you want a pretty detailed explanation of how this is done, see this other THREAD where I went into great detail.
So then, here's the steps to solve the problem:
Details to edit the Pro/E launch command:
<some path here>\proe.exe "c:\documents and settings\username\working_dir\load_colors.txt"
Notice, your path can be anything you need it to be... just make sure it's enclosed in double quotes as shown above. You don't have to have them but if your pathname contains any spaces, you'll need them. Just be safe and use them.
Other things to note... the trail file (load_colors.txt) specifically attempts to load a file called syscol.scl. Why that name? It's the default name Pro/E will attempt to use when you save a color scheme. You can certainly use another name for your color file, you'll just have to add that name to the load_colors.txt file.
Also, the trail file attempts to load the syscol.scl file from the user's working directory. Why that specific directory? When you start Pro/E, everyone has a startup/working directory. Even if you're using Windchill linked to a local workspace, you still have a working directory. If you don't know what you're working directory is, look in the shortcut you use to launch Pro/E. The "Start In" field defines your working directory. Or... select the "Working Directory" option from the left side of the dialog box that comes up when you attempt to load ANY file. Even in large companies with crazy custom launchers for Pro/E, there's an initial working directory. This should circumvent the problem with the $USERNAME variable.
Once you launch Pro/ENGINEER with the modified shortcut or startup command, the trail file will run and your colors will be set.There's a dozen other cool things you can do with this technique. In this case, you're using the trail file to cleverly work around an obstacle that, hopefully, will be fixed in a future version of Creo.
I could go on for another hour covering all the exceptions and nuances of this process but I think you get the idea. If not, write back.
Good luck!!
-Brian
Buddy,
try system_colors_file c:\pro\Garland\$USERNAME\sf\syscol.scl
Martin Hanak
Hey Martin,
Tried it but did not work.
Buddy
I think Martin is correct I use:
browser_favorite X:\ProE\ProE_Data\$USERNAME
This works for me in both Wildfire 5.0 and now in Creo 2.0.
Hi Buddy...
We're definitely chasing our tails in this thread. Let me set the record straight and put this issue to bed...
First, the correct nomenclature is $USERNAME or $SYSTEM_VARIABLE where "SYSTEM VARIABLE" can be any valid DOS variable. Second, this variable works for absolutely everything...
... except for the system_colors_file option!
:Tap Tap Tap: Are you listening PTC? (That's me tapping on the screen to get their attention) You cannot use a system variable with the system_colors_file option, it simply does not work. It doesn't even work if you put the variable (or the entire path) in quotations. I've tried all manner of quotations, backquotes, and tick marks. Trust me, it's broken! Works everywhere else... doesn't work here.
So then, you're stuck with Plan B. I don't know how committed you are to making this work- but I have a solution if you're willing to work for it. First, download the attached file called load_colors.txt. This is just a small trail file that executes a few simple commands to load the color file "syscol.scl" from the user's working directory.
People tend to forget about trail files. No one uses them. They're practically useless anymore. Once upon a time they were lifesavers. Now they're just huge streams of text and cluttered, unintelligible hieroglyphics that would make a seasoned archaeologist faint. Still, they can be useful.
The second thing people tend to forget, is that it is possible to run a trail file automatically when you launch Pro/E (or Creo). All you have to do is put the path to the trail file right after the launch command! If you want a pretty detailed explanation of how this is done, see this other THREAD where I went into great detail.
So then, here's the steps to solve the problem:
Details to edit the Pro/E launch command:
<some path here>\proe.exe "c:\documents and settings\username\working_dir\load_colors.txt"
Notice, your path can be anything you need it to be... just make sure it's enclosed in double quotes as shown above. You don't have to have them but if your pathname contains any spaces, you'll need them. Just be safe and use them.
Other things to note... the trail file (load_colors.txt) specifically attempts to load a file called syscol.scl. Why that name? It's the default name Pro/E will attempt to use when you save a color scheme. You can certainly use another name for your color file, you'll just have to add that name to the load_colors.txt file.
Also, the trail file attempts to load the syscol.scl file from the user's working directory. Why that specific directory? When you start Pro/E, everyone has a startup/working directory. Even if you're using Windchill linked to a local workspace, you still have a working directory. If you don't know what you're working directory is, look in the shortcut you use to launch Pro/E. The "Start In" field defines your working directory. Or... select the "Working Directory" option from the left side of the dialog box that comes up when you attempt to load ANY file. Even in large companies with crazy custom launchers for Pro/E, there's an initial working directory. This should circumvent the problem with the $USERNAME variable.
Once you launch Pro/ENGINEER with the modified shortcut or startup command, the trail file will run and your colors will be set.There's a dozen other cool things you can do with this technique. In this case, you're using the trail file to cleverly work around an obstacle that, hopefully, will be fixed in a future version of Creo.
I could go on for another hour covering all the exceptions and nuances of this process but I think you get the idea. If not, write back.
Good luck!!
-Brian
Used this info and it worked like a charm..thanks Brian.
FYI - I was able to use a system variable with the system_colors_file option.
Thanks so much Brian!
You're very welcome! I just wish I had more time so I could make videos of these complicated answers. I know it's tough to decipher a page and a half of text instructions.
Good luck... if you get stuck write back.
Take care...
-Brian
This is how I fixed my problem. Its way wasier than what Brian has suggested.
HOPE THIS HELPED!