Trailmaker is now a collection of small utilities:
1 - Trailmaker
A script to build customized trailfiles, to process files in batch mode.
Here some ideas that you can make this script work for you:
Export multiple parts to Step/Iges
Import multiple Iges/Steps to Prt´s
Export multiple Drawings to DXF/DWG/PDF
Export/verify all instances of a family table
Bring multiple parts/drawings into session
Plot a lot of drawings
Run a mapkey
Modify Units/Mass Properties
Create Jpeg´s of multiple parts
Mix all this together...
Lots of possibilities.
2 - Assembler
Script to assemble components (by default) in a assembly in batch mode;
3 - FT-Drawing
Script to create drawings for each instance of a family table;
4 - New_Drw
Script to create a new drawing with same name of the active model;
4 - Open_Drw
Script to open a existing drawing with same name of the active model;
Open Readme.txt for more instructions.
Finally I got some free time and managed to run your script. The problem was in that we use "p" mapkey for printing drawings, so that was the reason for loop, because p was ommited and "trail" portion was run again.
Not sure of what you want to know.
Creo creates trailfiles that record everything you do inside of creo. You can use them for recovery purposes in case of crash. But you can also use the code to control Creo.
For example, opening a file appears something like this in trail file:
~ Command `ProCmdModelOpen`
~ Update `file_open` `Inputname` `prt1.prt`
~ Activate `file_open` `Open`
So, if you replace "prt1.prt" with other partnames you will be able open multiple parts with one trailfile.
So, basicly, what do we need to create a custom file:
The list of files, I was too lazy to built a interface, so I capture the list from Creo fileopendialog. This was the easiest way for me, you can pre-filter by type (Prt, Drw,Asm, instances...), and then it opens the prefiltered list in notepad, where you can choose one by one. This list is saved in file_list.txt.
The code to execute inside of the files, you can create your own from trailfiles. I created some just for example, but everyone has different needs, so the best is to customize them. They are inside of C:\TrailMaker\trails.
Now I have a list of files and a file with code to run inside of each one. I can create a file mannualy with copy/paste but that´s gonna take a while.
So I create a script in Autoit that creates file run_trail.txa, and:
Writes file open prt1
Writes trail code
Writes file open prt2
Writes trail code
Writes file open prt3
Writes trail code
..... until last file
Then all is needed is to run trailfile run_trail.txa.
You can create your customized trails and change the header, so I believe this is a interesting tool that can be used in all versions of Creo and Pro-e.
I hope I has been clear.
That option will be available in the paid version .
Now seriously, you just have to edit the trail.
Example, file prt2step.txt
!Export Step Files
~ Command `ProCmdModelSaveAs`
~ Update `file_saveas` `opt_EMBED_BROWSER_TB_SAB_LAYOUT` `C:\\Export\\Steps`
~ Activate `file_saveas` `opt_EMBED_BROWSER_TB_SAB_LAYOUT`
~ Select `file_saveas` `type_option` 1 `db_539`
~ Activate `file_saveas` `OK`
~ Activate `intf_export` `solids` 1
~ Activate `intf_export` `OkPushBtn`
Adding the two bold lines will define the destination directory. Just correct the path to yours.
Repeat for the other trails
Great job Jose !!!
I'm realy impressed.
But one question because I've faced with this issue some time ago, and I got stuck.
What in case, where a combined view is placed on drawing?? Question comes from one of my customer. He creates sheetmetal parts. As you know smt parts have two states (bended/unbended). It will be greate to create drw with two sheets, where first sheet shows bended part, and second unbended (used for export to dxf). Unbended state is created by simplify representation, an on drawing combined view is shown -that contains REP. Problem is, that in Creo there is impossible to replace model in drawing, if one of representation is used.
Case: smt part with family table inside, and drw created form generic with two states/sheets. Then, with some magic button for all instances documentation is created.
Do you have any idea how to solved it?