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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Summary: Automate Creation of empty rep?

davehaigh
11-Garnet

Summary: Automate Creation of empty rep?

Turns out I was making this more difficult than it needed to be.

When you look in the trail file, picking the top level assembly indicates that it's picking node0, so the pick is based on the position not the name of the item.

Since the top level assy is always node0 you can write a mapkey to create an empty rep.
mapkey cer @MAPKEY_LABELCreate Empty Rep;\
~ Activate `open_rep` `Define`;EMPTY;\
~ Select `main_dlg_cur` `PHTLeft.AssyTree`1 `node0`;\
~ Activate `compseledit` `DoneBtn`;

If you want to do a bunch of files, you need to use a trail file. Trail file snippet:
~ Activate `main_dlg_cur` `main_dlg_cur`
~ Command `ProCmdModelOpen`
~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`
~ Activate `file_open` `file_open`
~ Input `file_open` `Inputname` \
`C:\\Documents and Settings\\haigh1\\pro\\wf4_home\\test_assy_1.asm.1`
~ Update `file_open` `Inputname` \
`C:\\Documents and Settings\\haigh1\\pro\\wf4_home\\test_assy_1.asm.1`
~ Activate `file_open` `Open`
~ Activate `open_rep` `Define`
empty
~ Select `main_dlg_cur` `PHTLeft.AssyTree` 1 `node0`
~ Activate `compseledit` `DoneBtn`

The one thing to note here is that you need the double back slash in the path to the file.

You can use the trail-maker to create a monster trail file to do a bunch of files.

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.
0 REPLIES 0
Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags