How to turn a trail file into mapkey, suppressing user interaction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to turn a trail file into mapkey, suppressing user interaction
I'd like to have a note in Creo 3, created by mapkey, carrying model information.
Typing the parameters into the edit box results in Creo replaying letter for letter,
when using txa or mapkey. Almost painful to watch. Therefore, I've created a file containing
all information and imported it. I've stripped the resulting trail file of all unnecessary
lines and created a txa file as follows:
~ Activate `main_dlg_cur` `page_Annotate_control_btn` 1
~ Command `ProCmdAOGalleryList` 1 `FLAT TO SCREEN`
~ Command `ProCmdDtlInsFreeNote`
-0.150000 0.820000 L 0 1 0
~ Command `ProCmdDtlTextFromFile`
~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`
~ Update `file_open` `Inputname` `e:\\Workcenter\\Creo3param.txt`
~ Activate `file_open` `Inputname`
~ Select `main_dlg_cur` `3DDtlAssyTree` 1 `node0`
Works fine, but I'd rather have a mapkey than a txa file:
mapkey bn @MAPKEY_NAMEinfo;\
mapkey(continued) ~ Activate `main_dlg_cur` `page_Annotate_control_btn` 1;\
mapkey(continued) ~ Command `ProCmdAOGalleryList` 1 `FLAT TO SCREEN`;\
mapkey(continued) ~ Command `ProCmdDtlInsFreeNote` ;\
mapkey(continued) -0.150000 0.820000 L 0 1 0;\
mapkey(continued) ~ Command `ProCmdDtlTextFromFile` ;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`;\
mapkey(continued) ~ Update `file_open` `Inputname` `e:\\Workcenter\\Creo3param.txt`;\
mapkey(continued) ~ Activate `file_open` `Inputname`;\
mapkey(continued) ~ Select `main_dlg_cur` `3DDtlAssyTree` 1 `node0`;
Creo stops and asks for the placement, is it possible to turn this off?
Besides:
* txa files, once executed in Creo 3 ,can't be deleted within this session, just overwritten
* Running a txa file that produces an error disables the function to load any other trail file.
TIA
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.
- Labels:
-
General
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Andreas,
when you run txa manually, does Creo ask for the placement or not ?
Where do you want to place annotation ? In top lef corner ?
Do you place annotation in Part and Assembly mode ?
MH
Martin Hanák
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Martin,
running the txa file comes with no user interaction and that is what I want.
The annotation should be shown in part and assemblies, in the upper left corner.
When we switch to Creo 3 I will change our templates, but I'll need this workaround
for all the "old" files then.
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In a drawing you can use absolute coordinates to place things. don't think that's possible in the model.
However you can put a pause in the mapkey for placement. Then he user picks resume to continue on.
Or you could just have the mapkey run the trail file. That way you can add it to your ribbon
Pause syntax is like this:
@MANUAL_PAUSESelect the proper Distribution Control level. Then pick Resume;\
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A pause and user interaction is exactly what I'm trying to avoid here.
I mean, the trail file places the annotation just fine, so it's all there. There must be some kind
of syntax to accept the given coordinates, when played by mapkey.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
there isn't any method in the model mode to tell a mapkey to place something in a specific spot. Only in a trail file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Also like I said, you can run the trail file from a mapkey.
Look at this presentation from 2013
2014 PTC LiveGlobal Mapkeys TrailFiles Presentation Video - YouTube
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for the link, quite a rosetta stone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I haven't used txa files in a while, but this behavior is different than it used to be. Maybe PTC is trying to crack down on something or other, like support questions by making the tool so broken no one asks anymore.
I'd look at augmenting the process with AutoIt, which will place a click anywhere on the screen you want it to. There's an example recently about using AutoIt to automate hole placement dialogs. Create mapkeys for elementary operations in Creo and then Send the key sequences as required from AutoIt.
