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 the Community Ranking System, a fun gamification element of the PTC Community. X

Mapkey to read csv/text file for file name

ybhide
1-Newbie

Mapkey to read csv/text file for file name

Pro/E WF3 M250
WC 8.0 M030


We are trying to backup several thousand drawings with Pro/E>File>Back-up.


In order to save some time and efforts, we will like to partly automate the process of opening each drawing and backing up.


We have list of all drawing numbers. One of the wayscould be tofeed a set of say 25 (or whatever is max) drawings numbers. For this I need a mapkey that can read csv/text file. Is that even possible with standard mapkey tool?


Any ideas/suggestion in this regards are greatly appreciated. Thank you!



Regards,


Yugendra Bhide


Norse Dairy Systems
Columbus Oh



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.
1 REPLY 1
ybhide
1-Newbie
(To:ybhide)

Thank you everyone who replied.


Even though Pro/E mapkeys can't directly do what I was looking for, got couple interesting ways to achieve the task.


Option1: Modified Trail file
http://www.mobiusid.com/trail_maker_v2.htm
http://www.cadmin.pwp.blueyonder.co.uk/proadmin/trail-maker2.htm
http://www.proesite.com/index.html


Using mail merge - You can create a trail file by running thru one drawing, then using that trail file as a master, employ mail merge techniques to create one trail file for every drawing listed in your cvs. After that generate a batch file that runs a loop calling pro with each trail file as an option.



Option 2:Macro from outside Pro/E triggering Pro/E mapkeys and feeding file names
You can use VBA in Excel to 'Send Keys' to another window. Based on this create a mapkey that opens a file, but stops for the filename, then a mapkey that continues after the name is entered.
The VBA code sends the first mapkey to the Pro/E window, then the filename, and finally the mapkey that finishes the process. It may be advantageous to split the mapkeys further by having one to open the drawing and back it up, with another to close and erase it and its related files.
VBA can get the names by going down the list. Either you can import the list into Excel and go cell-by -cell or use the 'File Open' commands and go direct.


OR


Record it once and then go into the config.pro file and copy and paste it replacing the drawing number each time. Make sure to add a \ each time you paste. The last line should not have a \. That’s how Pro/E knows to end.
Alternatively, record the mapkey once and then write a script (vbs, Vba, bat etc) that generates a config.pro with the mapkey. It would read the cvs file and then copy and paste, replacing the numbers for you.



Option 3: Distributed Batch



Thanks again everyone!


Regards,


Yugendra Bhide


Norse Dairy Systems
Columbus Oh

Top Tags