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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Controlling WF startup dir in a .BAT-file

dvarkevisser
1-Visitor

Controlling WF startup dir in a .BAT-file

Dear all,

I have made an application in which projects are linked to a specific version of WF, the user selects his project to work on and automatically the right WF version is opened with all the right project settings.

My application uses a .BAT-file to startup a WF-version and to run a trialfile. With this trailfile the right config is loaded andthe right workingdirectory is set.

-call "C:\PTC\WF3\bin\proe1.bat" C:\PTC\Settings\startup.txt-

Now my problem is that WF is started in a certain directory, then the config is loaded. In this config is specified where WF drops its trial-files, but this is ignored and WF drops its trailfiles in the directory from which the program started.

If I put my config in the startup directory, the config will be used directly form startup and the trialfiles are dumped correctly in the config-specified folder. I could also put a 1 line config in the instalation\text directory for each WF instalation on the network. But I dont like both options

So my question is: is there a way to control the WF startup directory from the .BAT file. (just like in a desktop shortcut)

Kind regards,

Dennis Varkevisser

______________________________________________
Dennis Varkevisser
Flexible Engineering Support
<u>www.flexibleengineeringsupport.nl
+31 6 50 68 01 79
</u>

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.
2 REPLIES 2

Dennis,

Prior to the line in your batch file that starts proe enter an line that
changes the directory to the desired locations

cd /d %STARTUP_DIR% where STARTUP_DIR is a variable that is set when the
user selects the project they will be working on.

That said, the way we handle this kind of thing is to, if necessary, copy
the config.pro from our global stds to the proe text dir. Then we use the
TYPE command and append to the text dir config.pro any other options that
are required for that user which are listed in another config file.

Example

type %PRO_STDS%\configs\cham.pro >>%PROE_LOADPOINT%\text\config.pro where
cham.pro are config options for our users in Cham.

David


As David said, Pro|E will use the directory that the batch file is
running in when you call Pro|E. So, no matter what the 'Start In' in
the icon says, if your batch file changes to a different directory,
that's now the startup directory for Pro|E.

As far as trail files go, unless there's a reason to have them different
for every project, I'd just specify them in a config/pro file stored in
the load point. You can have your batch file copy that from a server
location at start up so you can manage a single file rather than one on
each workstation. That's how we manage it here.

Doug Schaefer
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags