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.

using batch to run a mapkey for layering

dsergison

New member
I have a mapkey that generates layers and adds items by rule. I would like to use pro/batch to run it on multiple files.


I cannot figure out how to write the batch file to call a mapkey. Can anyone provide an example of a batch file calling a mapkey? or any example batch syntax?


Thanks, Dan
 
the trail file will have to have a .txt extension and then in the


pro/engineer command box of pro batch you will Start Pro/E with the trail file as an argument,



<your path to start> proe.bat mylayers.txt
 
wsylvester,

Can you please help me with this? I am not very familiar with Pro/BATCH, but I got the thing to run supposedly with the trail file, but I get nothing. (And it runs suspiciously fast.)

What do I set the action to in the BATCH dialog?

Thanks for your help.
 
Hi Spidernate
In my opinion, Pro/Batch is used to print or save in an other format.
When I have to do the same thing on a collection of files, I use Pro/e in batch-mode, with or without graphic.
With graphic, start Pro/E normally Option Lauch a trail file (trail file must be with txt extension)
With no graphic, for wildfire2 I use:
c:\ptc\proengineer\wf2m180\bin\proe.exe c:\ptc\proengineer\wf2m180\bin\default.psf -g:no_graphics c:\my_trail\fichier_trail.txt.
You have to specify the complete path of the exe and the psf files and also the path of the trail file.
I construct the trail file with excel.
1- open pro/e set the default directory.
2- copy the trail file written by Pro/e in trail_1.txt
3- open the pro/e file, make what I need in interactive mode, save the modified file.
4- copy the trail file written by Pro/e in trail_2.txt
5- quit pro/e or not, whatever you want:
a)don't quit: to keep it open (in graphic mode) or
b) quit: to close xtop when you run in nographic.
After, in excel
it is quite difficult to explain and my english is net very good, so I can send you an example of the excel file.
The idea is that you have to construct you trail file with 3 parts:
first part the trail_1.txt
second part is repeated fo each file you have to treated. (I take the necessary line in trail_2.txt, replace the name of the first file I have opened by XXX, make an excel macro to

replace XXX by each file I have to treat)
third part, quit pro/e or not.
With this I make a long trail file, I can replay interactively first for a few files, and then in batch no_graphic mode.
In no_graphic mode, it is very quick, I have modified 500 files in 4 minutes. In graphic mode it is quite long.
Gilbert
 

Sponsor

Articles From 3DCAD World

Back
Top