2010
Batch Import .EXP files
Thread
Batch Import .EXP files
Chun That Ding
[St Aerospace Mobile]
May 14, 2010 07:00 PM
Hi all,
I always have up to 100+ .exp files to import at one time every now and then. We get drawings from different tech group and vendors. I use the CATIMP utility... but CATIMP seems to only allow me to import one .exp file at a time. For example, in CATIMP I have to specify /.../../ABC.exp as Input File to extract all the MODELS in the ABC.exp file. Say I have 20 .exp files in a directory /home/exp/ I tried specifying "Input File" as just /home/exp or /home/exp/ to import all 20 .exp files at one time. However, I always ends up with Error - Members Not Found. Appreciate any help I can get. Thank you! |
RE: Batch Import .EXP files
JOHN CERVENAK
[Chrysler Group LLC]
May 26, 2010 03:51 PM
Most CATIA utilities can be run in command mode. Try running CATIMP once and capture the CATIMP.in file. Rename it to myCATIMP.in so that you can make changes to it. Develop a script that grabs the name of all of the .exp files in a directory and, for each file, have the script modify the filename appearing in the DEFDSN statement in the myCATIMP.in file and have it run the following command: catutil -XM -l catimp -i myCATIMP.in No interaction is required. Hope this helps! John C. |
RE: Batch Import .EXP files
Chun That Ding
[St Aerospace Mobile]
Jun 01, 2010 05:50 PM
Hi John,
Thanks for the input!! I get a jist of what you are saying. In summary: 1) Output the list of .exp path into a txt file (I will call this EXPPATH.txt) 2) Write a script to change the myCATIMP.in DEFDSN statement with the first line of the EXPPATH.txt 3) Include in the script "catutil -XM -l catimp -i myCATIMP.in" after changing the DEFDSN 4) And then Loop the script for the second line of EXPPATH.txt, and then third line, fourth line......until end Sounds like a pretty easy task. But I have absolutely no idea how to write scripts in UNIX or the commands . p/s: maybe you can draft something up if you have free time..if not.. thanks anyway! btw to whoever is interested my CATIMP.in file look like this / *PROJECT DEFAULT *GROUP catia *USER asdf *PASSWORD / / ----------------------------------------- / *READ FT25F001 / *DEFDSN FT25F001 /home/path.exp STORAGE_DEVICE *ALL / *DEFDSN MJ "/home/output",MODEL *WRITE MJ *CORPRJ bca2mae *CORFIC bca2maex *RECEIVE |
All Times America/New_York