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 PTC Community Badges. Engage with PTC and see how many you can earn! X

config.pro w/ variable options set at runtime

akelly
12-Amethyst

config.pro w/ variable options set at runtime

Using Wildfire 4 M220 64-bit on Windows 7


We have network locations forcommon files referenced by the config.pro (e.g. pro_dtl_setup_dir, pro_symbol_dir, etc.). Every time the sys admins make a change to the config.pro, our Pro/E "breaks" because the drive letterat our site where these files are locatedis different than the drive letter where the sys admins are located. When we notice things not working correctly, we have to edit the config.pro file and change all the drive letters to the "correct" ones for our site.


I was experimenting with using environment variables so that a common "universal" config.pro could be used. Something isn't working. I remember doing this before at another company. Not sure what is different this time.


In the Pro/E start-up batch file there's an environment variable that sets the drive letter where these are stored


pro_symbol_dir $SOURCE_DRIVE:\pro_symbols


If I changed it back to a hard-coded drive letter, it worked again.


andrew.kelly@honeywell.com


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.
4 REPLIES 4
RandyJones
19-Tanzanite
(To:akelly)

On 10/08/12 13:04, Andrew Kelly wrote:
>
> Using Wildfire 4 M220 64-bit on Windows 7
>
> We have network locations for common files referenced by the config.pro (e.g. pro_dtl_setup_dir, pro_symbol_dir, etc.).  Every time the sys admins make a change to the config.pro, our Pro/E "breaks" because the drive letter at our site where these files are located is different than the drive
> letter where the sys admins are located.  When we notice things not working correctly, we have to edit the config.pro file and change all the drive letters to the "correct" ones for our site.
>
> I was experimenting with using environment variables so that a common "universal" config.pro could be used.  Something isn't working.  I remember doing this before at another company.  Not sure what is different this time.
>
> In the Pro/E start-up batch file there's an environment variable that sets the drive letter where these are stored
>
> SET SOURCE_DRIVE=W
>

Try this:
SET SOURCE_DRIVE=W:

> When I changed the config.pro to the following, I could't' insert symbols into the drawing from our symbol directory.
>
> pro_symbol_dir $SOURCE_DRIVE:\pro_symbols
>

and this:
pro_symbol_dir          $SOURCE_DRIVE/pro_symbols

> If I changed it back to a hard-coded drive letter, it worked again.
>
> pro_symbol_dir W:\pro_symbols
>
> What's up?
>
> Andrew Kelly
>
> Honeywell Sensing and Control
>
> andrew.kelly@honeywell.com <">mailto:andrew.kelly@honeywell.com>
>
>
> ----------


--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
   Fax: 785-667-2695
------------------------------------------------------------------------

amedina
1-Visitor
(To:akelly)

Maybe you need to restructure the way you start pro/e so that the Admin has
more control over the config.pro. We copy the config.pro every time you
start pro/e. That way only your local config.pro is different. So if
something is going on at machine X, I know for sure its not the
config.prothat I give my users. our config just lives in the network
and gets copied
to the text folder in the install. It seems to work. my group is only 120
users, I don't know if this would work for a large base but I will bet so.
I can probably download the config.pro from the server several thousand
times per second. From my daily license tracking I can tell that users
start pro/e up maybe two to five per minute as they come in in the morning
and after lunch.

having a .pro file that is copied only at install or by email = old file,
old news.



dgschaefer
21-Topaz II
(To:akelly)

Is there any way that you can use the same drive letter? It seems like
standardizing that will make lots of things easier.



That said, what you're doing should work. I set the following variable
in our launch batch file:



set proe_lib=P:\



And in our company wide config.pro (all versions, WF3-Creo2, are
essentially the same) I have this:



pro_symbol_dir $proe_lib\templates\00_design_central\symbols



What I just realized is that I have an extra '\' in there, which I don't
believe was intentional. It works, however, so I'm not messing with it.
😛



--
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
davehaigh
12-Amethyst
(To:akelly)

Here are some scripting ideas.


1. You can check to see if the machine has the network drive mounted as the correct drive letter and if not mount it for the user. Like this:

if not exist "P:\StartupConfigs" (net use P: \\servername\sharename /persistent:yes)

I'm just looking for a folder on the drive letter. If it doesn't exist, I assume it's not mounted. It sounds to me like your admin staff need this.



2. You can copy the config down to the loadpoint and then make it read only.

Echo f|xcopy "path-to-files\loadpoint_configs\*" "loadpoint-path\text" /y /r /s /e

attrib +R "loadpoint-path\text\config.pro"

attrib +R "loadpoint-path\text\config.sup"



3. Another cute trick base on idea #1 is using "if" to find out what drive letter the CD/DVD is mounted on. Like this:

rem ** Find the CD Drive on the system.

@echo off

ECHO Try to find the CDROM-DRIVE

SET CDROM=A

IF EXIST D:\Software\Creo2_DVD.zip SET CDROM=D:

IF EXIST E:\Software\Creo2_DVD.zip SET CDROM=E:

IF EXIST F:\Software\Creo2_DVD.zip SET CDROM=F:

IF EXIST G:\Software\Creo2_DVD.zip SET CDROM=G:

IF EXIST H:\Software\Creo2_DVD.zip SET CDROM=H:

IF EXIST I:\Software\Creo2_DVD.zip SET CDROM=I:

IF EXIST J:\Software\Creo2_DVD.zip SET CDROM=J:

IF EXIST K:\Software\Creo2_DVD.zip SET CDROM=K:

IF EXIST L:\Software\Creo2_DVD.zip SET CDROM=L:

IF EXIST M:\Software\Creo2_DVD.zip SET CDROM=M:

IF EXIST N:\Software\Creo2_DVD.zip SET CDROM=N:

IF EXIST O:\Software\Creo2_DVD.zip SET CDROM=O:

IF EXIST P:\Software\Creo2_DVD.zip SET CDROM=P:

IF EXIST Q:\Software\Creo2_DVD.zip SET CDROM=Q:

IF EXIST R:\Software\Creo2_DVD.zip SET CDROM=R:

IF EXIST S:\Software\Creo2_DVD.zip SET CDROM=S:

IF EXIST T:\Software\Creo2_DVD.zip SET CDROM=T:

IF EXIST U:\Software\Creo2_DVD.zip SET CDROM=U:

IF EXIST V:\Software\Creo2_DVD.zip SET CDROM=V:

IF EXIST W:\Software\Creo2_DVD.zip SET CDROM=W:

IF EXIST X:\Software\Creo2_DVD.zip SET CDROM=X:

IF EXIST Y:\Software\Creo2_DVD.zip SET CDROM=Y:

IF EXIST Z:\Software\Creo2_DVD.zip SET CDROM=Z:

if %CDROM%==A GOTO :CD_ERR

ECHO Your CDROM-DRIVE is: %CDROM%

:CD_ERR echo No cd drive found

set PATH=%PATH%;"%CDROM%/scripts"

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


Top Tags