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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Trail File

jlippeth
1-Newbie

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.



IE.

File list called detail.txt

Contents of this file:

n11093-2000.prt

n11156-2005.prt

n11156-2400.prt

n11156-2501.prt

n11156-2502.prt



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` \

0

~ 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` \

`DLG_PREVIEW_POST` \

`file_open`

~ 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

1

@ draw scale

1

!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.



Thanks



Regards,

JScott



__________________________________________________________________________________________________________________

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

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 (www.tcl.tk) 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.

Rgds,

H. Martin

Top Tags