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.

PDF File name & Parameter

CalManya

New member
I have to export the drawing files to PDF and DWG including the revision level in the filename . (ex. FILENAME_REVISION.pdf). The revision level are defined as a paramenter into the model.


I would like to do this operation automatically, I mean, using a macro, or similar, export the active drawing file and forming theexported filename with the DRW filename plus the value of the parameter "REVISION".


Is it possible?


Thanks.
 

srieger

New member
If you use Windchill there is a product from eTrage(etrage.com) called Plot Solutions for Windchill (PSW). This is a powerfull tool to do batch plotting in so many ways. You can put the release level, revision, etc into the file name it outputs. You can output anything Pro can output.
 

anwyl

Member
Until PTC makes it possible to paste from the clipboardin mapkey code this is not possible to do using only mapkey code. Making a mapkey to do this involves having the mapkey call some external code, e.g. a batch file, or autoit script.

I have seen two ways that this has been done.

The first method saves the file and saves the parameters as a text file, the mapkey then calls the external code which creates the desired file name and renames the file. This method has the advantage that the length of the file name is not limited to 32 characters but requires keeping track of where the file is saved.

In the second method a mapkey creates a relation in pro-e to make a parameter which is the text of the desired file name. The parameter is then copied to the clipboard. The external code then makes the name in the clipboard into a small piece of mapkey code which saves a file with the new name. That naming mapkey is then loaded and run by the main export mapkey to save the file with the desired name. This method is limited to 32 character file names (because that is pro-e's limit) but the file can be saved to any location.

If you are interested in trying to write a mapkey to do this I can post some code examples.

WF4 user



Edited by: anwyl
 

Flo62990

New member
Until PTC makes it possible to paste from the clipboardin mapkey code this is not possible to do using only mapkey code. Making a mapkey to do this involves having the mapkey call some external code, e.g. a batch file, or autoit script.

I have seen two ways that this has been done.

The first method saves the file and saves the parameters as a text file, the mapkey then calls the external code which creates the desired file name and renames the file. This method has the advantage that the length of the file name is not limited to 32 characters but requires keeping track of where the file is saved.

In the second method a mapkey creates a relation in pro-e to make a parameter which is the text of the desired file name. The parameter is then copied to the clipboard. The external code then makes the name in the clipboard into a small piece of mapkey code which saves a file with the new name. That naming mapkey is then loaded and run by the main export mapkey to save the file with the desired name. This method is limited to 32 character file names (because that is pro-e's limit) but the file can be saved to any location.

If you are interested in trying to write a mapkey to do this I can post some code examples.

WF4 user



Edited by: anwyl

HI Anwyl , I' m very interesting to have some examples
 

Sponsor

Top