Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Starting ProEngineer from a batch file

peterjfrancis

New member
Hello,
I'd like to be able to start Pro/E from a DOS batch file. I can open it in the correct folder but I need to know if I can pass the drawing or model name as a variable.
Has anyone done this ?

Thanks for your help

Regards

Peter
 
Yes you can. If you run Pro/E and then an object name it will attempt to load it. For example:


proe1 mydrawing.drw


If you pass it the argument with no .# extension it will use the highest number. If you pass it the argument with the .# it will use that particular verison.
 
Here is the text of a batch file I use to ensure that when I Open a file from the browser, I have all of my config options (Startup directory is C:\Wildfire).


@echo off
c:
cd \Wildfire
"C:\Program Files\proeWildfire 3.0\bin\proe.exe" %*
 
robertib said:
Here is the text of a batch file I use to ensure that when I Open a file from the browser, I have all of my config options (Startup directory is C:\Wildfire).


@echo off
c:
cd \Wildfire
"C:\Program Files\proeWildfire 3.0\bin\proe.exe" %*


the loadpoint's executables folder "C:\Program Files\proeWildfire 3.0\bin" or wherever else you have installed it should already be defined as an enviromental path variable so you should be able to shorten the last line to

proe.exe %1


DB
 
Hi All,
Thanks for the help , I've given it a try and I'm getting error messages , Pro/E can find any of the models , drawing format or even the fonts !

It doesn't seem to be setting the Working Directory.

Any suggestions ?
 
You're load_point/bin dir should already have .bat files that start Pro/E. They will call the executable & a .psf file that has all the necessary stuff for Pro/E to run in your environment AND load any file name supplied on the command line.
 
Thanks dr_gallup, thats working now.

I have a problem that I have to set up each combination of file extension and version no. i.e. partname.prt.23 has to be associated with the batch file
and partname.prt.24 also has to be associated with the batch file.

The working directory has to be set manually as Pro/E opens in the default folder.

Thanks for your help again !

Regards

Peter
 
Hey everbody,


I know It's been a while, but I'd thought I'd try. Has anyone ever used a mapkey to run a batch file that open an excel spreadsheet. I need some help! It works...but it take too long to open! Any suggestions?


Omar
 
In you batch file to launch proe, use a 'cd' command to change to your working directory before calling Proe. That will set the start working directory for that session of proe.


You'll then have to use the full path to the proe executable.
 
Hey Doug,


Thanks for responding. My problem is opening an excel spreadsheet from the pro e dos. It takes much longer to open an excel spreadsheet from pro e dos rather than windows dos! I even change the directory to the excel spreadsheet location in dos and do a - start/high project_name.xls (this opens the file with high priority). For some reason pro e stalls when opening the file, although it is being open from dos. Have you ever had something similar?


Omar
Edited by: omarhernandez
 
Are yuo trying to open an excel spreadsheet in Pro|E from the command line? I'm confused now.
smiley5.gif
 
yes, but It takes a long time to open it fro the Pro e command line (about 45 sec). When I do it from the windows command line (by window I just mean that dos isn't open from pro e) it open it in about 2 sec.


Omar
 
William,


I tried your solution and It did open quickly..,but It still takes long when specifing the .xls file name...here is my batch file...


echo on
C:
cd C:\Program Files (x86)\Microsoft Office\OFFICE11
start/high excel.exe
X:
cd X:\National_7-4\N74_Projects_Boltex\Hatebur_Projects_Boltex\ 515N_AMP70
start/high 515N_Input.xls


Omar
 
how about if you load the file thru File>open in excel itself





I grabbed the biggest .xls file I have here and dropped it in my start-up dir and editted the mapkey to point to it .. and it loaded pretty quick...but it's only 215kb


the excel samples files


mapkey xx @SYSTEMc:\\office\\Office\\excel.exe samples.xls
 
I have a mapkey that runs a batch file, which opens the .xls - the reason i need to do it with a batch file is because I have variables that change, which change which .xls file I open.


My mapkey is :


mapkey xx SYSTEMcd X:\\National_7-4\\VBA_Dies_Proj\Open_Workbook.bat;


The batch file is :


X:
cd X:\National_7-4\N74_Projects_Boltex\Hatebur_Projects_Boltex\ 515N_AMP70
start/high 515N_Input.xls


Omar
Edited by: omarhernandez
 

Sponsor

Back
Top