Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Trail File


Trail File

Hi All

I'm working on a way to develop a faster method to detail my components.

I'm asking for some assistance in hopes that someone may have some tips
to share.

My basic outline;

Using a list of parts that need detailing and somehow merge the names
into a working trail file.


File list called detail.txt

Contents of this file:






Working Trail file called detail_trail.txt

Contents of this file:

!trail file version No. 1400

!Pro/ENGINEER TM Wildfire 4.0 (c) 2009 by Parametric Technology
Corporation All Rights Reserved.

~ Command `ProCmdModelNew`

~ Select `new` `Type` \

1 `Drawing`

~ Activate `new` `chk_use_default_template` \


~ Activate `new` `OK`

!Command ProCmdModelNewExe was pushed from the software.

~ Activate `dwg_create` `psh_model_browse`

< 2 0.118519 178 0 0 100 1600 0 0 1200 13

~ Trail `UI Desktop` `UI Desktop` \



~ Select `file_open` `Ph_list.Filelist` \

1 `nxxxxx-2000.prt`

~ Activate `file_open` `Ph_list.Filelist` \

1 `nxxxxx-2000.prt`

~ Select `dwg_create` `rad_format` \

1 `1`

~ Select `dwg_create` `lst_template_names` \

1 `comps_start`

~ Activate `dwg_create` `psh_ok`

@ ok

!make a drawing

@ draw scale


@ draw scale


!sket_eps 7.5

< 0 1.067000 1067 0 0 937 1600 0 0 1200 13

< 0 1.039000 1039 0 0 937 1600 0 0 1200 13

~ Command `ProCmdModelSave`

~ Activate `file_saveas` `OK`

!%CIDRW0001 has been saved.

I need to find nxxxxx-2000.prt and replace it with the names provided by
the Detail.txt

Note; the names listed in the Detail.txt file will vary from job to job,
otherwise I would just write a custom trail file to repeat those names.





This email may contain material that is confidential, privileged and/or attorney work product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

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.

As the trail file is a simple text file, any script language for the OS You use will do the task. In UNIX, use e.g. 'sed' to replace the placeholders by the proper file name.

Tcl ( will do the task in all OS environments, and even offers a GUI.

Create a template trail file with placeholders (be sure to test it thoroughly, You may manually remove all scroll and zoom logs), then setup the script to read the list of files as input and for each input line assemble the trail file.

Two methods may be used: assemble the trail file stubs to one larger file and manually run this in ProE or setup the script to run within proe interactively (which is a bit more complicated).You might of course also do the whole thing in Javascript in a web page running in the embedded browser.

The solution depends on the level of comfort You desire...

To support the process, create a specific drawing template, which already has predefined views and other repeated drawing layout.


H. Martin

Top Tags