Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
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
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
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
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;\
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.
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.
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
Thanks for the link, quite a rosetta stone.
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.