Skip to main content
17-Peridot
May 12, 2016
Question

Mapkey Writing/Editing Tips

  • May 12, 2016
  • 42 replies
  • 91334 views

I've created several mapkeys lately so I thought I'd share some general tips I learned to write it down for next time. Please share your own tips below to expand the collection.

This was done on Creo 3 M060 but the ideas should hopefully be not specific to that.

Mapkey Writing/Editing Tips

General Tips:

  • Mapkeys often break when upgrading between Creo Versions (Creo 3 vs Creo 1) but they can save you a lot of time in the year or two between versions.
  • Open the mapkey menu by searching for Mapkeys in the upper right. Also, if someone knows how find the Mapkey menu behind when its behind other Creo Windows, please share.

          Launch Mapkey Menu.jpg

  • Record commands from the RMB or the Quick Access Toolbar to eliminate extra Mapkey lines that just moves around Creo for no reason. Most commands can be launched without being on a specific interface tab.
  • Mapkeys skip any commands they cannot execute. This lets users add in some logic to close menus that sometime popup or delete items if that would cause an error (e.g. view4dxf view gets deleted if it exists to always allow view4dxf view to get added without throwing an error).
  • When editing mapkey text, always create a backup or copy of the original code so you can copy and paste back in as needed. I usually keep Notepad open to copy and paste code into before changing mapkeys.
  • As far as I know, mapkeys cannot have comment lines except at the start and cannot have blank lines. Please share if someone has a way to do this.
  • Mapkeys seem to have a minimum and maximum number of characters per line. I usually just visually compare to other mapkey lines to make sure it’ll work. Someone might know the exact limits.
  • Every line except the last line of a mapkey needs to end with a \
  • I like to record mapkeys and then save just that specific mapkey as a text file to my desktop to copy into my actual config.pro. You can give it a relevant name to find it easier like pdf.pro. This will save only the mapkey you have selected into a text file.

          record mapkey.jpg

Quickly Update Mapkeys in the Current Creo Session

THIS WAS MY BIGGEST DISCOVERY FOR MAPKEYS TESTING! Originally, I would update the config.pro text file and close Creo to update my mapkeys. However, you can just reimport the newly saved config.pro from within Creo so you don’t destroy your test setup. I wrote a mapkey to do that called UPMAP that uses my working directing config.pro. My working directory is in the C:\Users\Public\Documents location. Hopefully this works for you but I make no promises. Make sure to save your work before trying any new mapkeys.

mapkey upmap @MAPKEY_LABELUpdate Config.Pro - upmap;\

mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg`;\

mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\

mapkey(continued) ~ Select `ribbon_options_dialog` `ConfigLayout.ImportExportBtn`;\

mapkey(continued) ~ Close `ribbon_options_dialog` `ConfigLayout.ImportExportBtn`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.Open`;\

mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`;\

mapkey(continued) ~ Activate `file_open` `Current Dir`;\

mapkey(continued) ~ Select `file_open` `Ph_list.Filelist` 1 `config.pro`;\

mapkey(continued) ~ Command `ProFileSelPushOpen_Standard@context_dlg_open_cmd`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;

Execute Multiple Mapkeys in one Mapkey:

I’ve only done this once so bear with me here with some help from James post linked below. This example calls >storetmp then >partnamesave followed by >loadconf mapkeys. Note the ~ is not required.

mapkey(continued) %>storetmpfile;%>partnamesave;%>loadconf;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `CancelPshBtn`;\

How to create a drawing with same name as active model with Mapkeys


Getting Input from Users

Sometimes you need to get input from users before continuing. You can change how the mapkey records input, but I haven’t played with this too much.

get input.jpg

I usually just leave it at the default and add code in as needed. The two commands I know about are @MANUAL_PAUSE and @PAUSE_FOR_SCREEN_PICK. @MANUAL_PAUSE lets you tell users what they’re supposed to do but make sure you tell them to RESUME and not click any Creo menus as needed. Sometimes you need a @MANUAL_PAUSE with @PAUSE_FOR_ SCREEN_PICK.

1.jpg2.jpg 

mapkey(continued) ~ Activate `visual_dlg0` `Edit`;@MANUAL_PAUSESelect primary surface. RESUME;\

mapkey(continued) @MANUAL_PAUSESelect the bottom edge or surface. RESUME;@PAUSE_FOR_SCREEN_PICK;\

Removing Duplicate Code from Mapkeys:

When inputting keyboard values, Mapkeys can create many extra lines which can make it tedious to edit later. Remove if possible but test as you go as some items cannot be simplified.

mapkey(continued) ~ Activate `visual_dlg0` `ZoneNmCreate`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `v`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `vi`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `vie`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `view`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `view4`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `view4d`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `view4dx`;\

mapkey(continued) ~ Input `visual_dlg0` `Table_INPUT` `view4dxf`;\

mapkey(continued) ~ Update `visual_dlg0` `Table_INPUT` `view4dxf`;\

mapkey(continued) ~ Activate `visual_dlg0` `Table_INPUT`;\

The RMB menu commands open and closes before executing. Remove these lines and go straight to the command.

mapkey(continued) ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\

mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;\

mapkey(continued) ~ Command `ProCmdDwgPageSetup@PopupMenuGraphicWinStack`;\

In general, the ARM and DISARM commands when paired next to each other do nothing:

mapkey(continued) ~ Arm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCUBE` `name`;\

mapkey(continued) ~ Disarm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCUBE` `name`;\

mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCUBE` `name`;\

In general, the OPEN and CLOSE commands when paired next to each other do nothing:

mapkey(continued) ~ Open `main_dlg_cur` `LayerActionMenu`;\

mapkey(continued) ~ Close `main_dlg_cur` `LayerActionMenu`;\

mapkey(continued) ~ Command `ProCmdLayer_SelectLayers`;\

When selecting items sometimes additional lines get added. Here’s an example where I select a parameter and designate it to Windchill:

mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable` 2 `rowDESCP` `value`;\

mapkey(continued) ~ RButtonArm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowDESCP` `value`;\

mapkey(continued) ~ PopupOver `relation_dlg` `ParamsPHLay.ParamUtils` 1 `ParamsPHLay.ParTable`;\

mapkey(continued) ~ Activate `relation_dlg` `ParamsPHLay.PBUtilDesignate`;\

OS Script or executing system CMD lines

I have limited experience with using this. The final mapkey code can become hard to read as it needs \n between CMD line commands – try to space it out to multiple make it legible. James has a good example here:

How to create a drawing with same name as active model with Mapkeys

I haven’t found the ability to toggle @SYSTEM with regular mapkey commands (I’m sure it’s possible). For now, I just call it at the end of the mapkey or create a separate mapkey just to do @system commands like in James’ example.

Creating mapkeys from Trail Files

You can also copy Creo mapkey code from trail files but keep in mind there will be a lot of trail file code you don’t want in a mapkey. I would only do this once you know how to read and write mapkeys. I strongly recommend sticking with the normal mapkey method I described above in the General Tips for most cases. Here’s an example:

Re: Can a mapkey delete itself?

If you have some additional tips, please share below.

42 replies

13-Aquamarine
July 5, 2024

I was looking at Lawrence S. reply that showed in-line comments. that was a great help: 

~ Comment ` Open Defaults to Working Dir `;\

 

I know folks like to use the Creo Configs plug in for their config file, but, edit my mapkeys seperately from the config, and then use our custom startup script for Creo to build the required config file that that specific environment on startup. So I have a config with all our common config settings, then configs with unique paths for each group, and finally text files of the mapkeys I load for that specific environment. Like this:

echo y|copy "%DRIVE%\configs\%CREOSHORTVER%\core\core-config.txt"+"%DRIVE%\configs\%CREOSHORTVER%\nse\nse-config.txt"+"%DRIVE%\configs\%CREOSHORTVER%\core\core-mapkeys.txt"+"%DRIVE%\configs\%CREOSHORTVER%\nse\nse-mapkeys.txt"+"%DRIVE%\configs\%CREOSHORTVER%\nse\nse-drawing-mapkeys.txt"+"%DRIVE%\configs\%CREOSHORTVER%\nse\nse-bom-placement-mapkeys.txt"+"%DRIVE%\configs\%CREOSHORTVER%\nse\nse-stamp-notes-placement-mapkeys.txt"+"%DRIVE%\configs\%CREOSHORTVER%\nse\nse-conversion-mapkeys.txt"+"%DRIVE%\configs\%CREOSHORTVER%\ribbon_loadpoint\project_config.txt" "%CreoPath%\Common Files\text\config.pro"

I decided to make a language file specifically for editing mapkeys. The xml is attached.

 

I wanted to high light key components of the language so that the actual mapkey syntax itself is not hi-lighted.

This allows you to see if your missing:

  • the ending character for a command,  ;
  • A line continuation, \
    • These two errors would be the most common failure mode when your manually modifying a mapkey.

 

And it hi-lights key components of mapkeys like:

  • The starting character for each individual command, ~ and #
  • Other mapkeys that run
  • Comments – full line and in-line
  • MAPKEY_NAME & MAPKEY_LABLE
  • Mapkey Pauses
  • System calls to a batch file
  • Paths to files called in mapkeys

 

Examples

Here is the first example of what it hi-lights.

davehaigh_0-1720204185199.png

 

 

Here is a second example of hi-lighting

davehaigh_1-1720204185209.png

 

 

davehaigh_2-1720204185210.png

 

 

Here is an example of the hi-lighting showing poor syntax on a mapkey that still works, but doesn’t have an ending ;

This lets you see where the syntax should be manually fixed.

davehaigh_3-1720204185212.png

 

 

 

Making your own language

In case you want to know how to create this:

 

From the language menu, pick:

  • User Defined Language
  • Define your language…

davehaigh_4-1720204185214.png

 

 

In the new dialog box pick Create new…

davehaigh_5-1720204185214.png

 

 

Here is how I’ve defined the language. Starting with the left tab and working to the right

Enter the yellow hi-lighted strings and then pick the Styler button to set the font color and background color.

  • You could also change the font face and size if wanted. I’ve selected just Bold for all these. By default it selects all three check boxes.

 

Folder & Default

davehaigh_6-1720204185217.png

 

 

Keywords List

davehaigh_7-1720204185222.png

 

 

Comment & Number

davehaigh_8-1720204185225.png

 

 

Operators & Delimeters

davehaigh_9-1720204185230.png

 

 

Delimiter 5 characters are:

  • Open = colon after the Drive letter,
  • Close = apostrophe at the end of the file name. before the semicolon command ending character.

davehaigh_10-1720204185231.png

 

 

To save the file, pick Export…

And browse to where you want to save it and give it a name.

  • I suggest a similar name as you named the language when you picked new.
    • The filename and the name of the language are two different things. Don’t get them confused.

davehaigh_11-1720204185231.png

 

5-Regular Member
September 3, 2026

Some great mapkey tips collected here. I thought I'd add my two cents, though it should be said up front that editing mapkeys and trail files is not supported by PTC.

 

1. Clearing the mapkey key buffer
Every mapkey user knows how annoying it is to mistype a mapkey. There are several ways to clear the key sequence shown in the message area: press Enter, delete it with Backspace, open the RMB menu, move the mouse cursor into the model tree, etc.
That last one is, as far as I can tell, not widely known among Creo users. Whenever I need to clear the key buffer, I flick my mouse left and right, so it briefly enters the model tree and comes back to the graphics window. Hovering over nodes in the model tree always clears the key buffer.


Another way to clear the key buffer is to execute any command. If you have mapkeys in your Quick Access Toolbar, you can still run them via shortcut even when you've just half mistyped a key sequence. In my case I press Alt+2 (do not wait until the key tips show) to run mapkey

~ Command `ProCmdUtilMessageEmpty`;

which clears the message area and, with it, the key buffer.

 


2. Clearing the selection buffer

I always found that clearing the selection buffer is a bit hidden under the RMB menu (as well as opening the Selected Items dialog with a double click).


You can record clearing the selection buffer with a mapkey and unlike “ProCmdOaDeselectAll” this works all the time.

mapkey sx @MAPKEY_LABELClear Selections (sx);\
~ Activate `main_dlg_cur` `buffer_clean`;


3. Changing the key sequence of recorded mapkeys in session
When you open an existing mapkey with "Edit…", you'll notice that the field below "Keyboard Shortcut:" is disabled, which suggests you can't change the key sequence after the fact.


The trick to changing it anyway is rather simple: use a mapkey. Open the trail file of the current session and watch it live. When you record a new mapkey, you can see the name of the dialog (`mapkey_record`), the name of the input component (`inp_name`) and the shortcut text you entered (`abcde`):

~ Update `mapkey_record` `inp_name` `abcde`

If you have a saved mapkey that runs exactly this line, you can edit the keyboard shortcut of another mapkey in that field, even though the component is disabled in the dialog. Click "OK" afterwards and the key sequence of that mapkey is changed in session.
 

Obviously, you could simply reload your entire mapkeys.pro file to update your mapkeys, but this mechanism becomes important in the next point.

 

4. Using the space bar in mapkeys
If you try to record a new mapkey with the shortcut `a b`, you'll get the error message "Mapkey key sequence cannot contain spaces".

The trick to using a space (or several spaces) anyway is to insert a placeholder and then use the mechanism from point 3. I usually record shortcuts like `a<space>b` and afterwards convert the key sequence to `a b` by running a trail file/mapkey. There is a catch though: you cannot save mapkeys containing a space, since Creo trail syntax is generally whitespace-insensitive.

So, at the start of each Creo session I run a trail file (.txa, called via a mapkey) which converts all my stored `<space>` mapkeys in session. The trail file opens the mapkey dialog, selects each `<space>` mapkey and edits its shortcut:

!trail file version No. 2123
~ Command `ProCmdUtilMacros`
! ------------------------------------------------
~ Select `mapkey_main` `list_mapkeys` 1 `<space>1`
~ Activate `mapkey_main` `ModifyButton`
~ Update `mapkey_record` `inp_name` ` 1`
~ Activate `mapkey_record` `OkButton`
~ Activate `uit_cmd_conflict_msgdlg` `yes`
~ Activate `UI Message Dialog` `yes`
! ------------------------------------------------
~ Select `mapkey_main` `list_mapkeys` 1 `<space>2`
~ Activate `mapkey_main` `ModifyButton`
~ Update `mapkey_record` `inp_name` ` 2`
~ Activate `mapkey_record` `OkButton`
~ Activate `uit_cmd_conflict_msgdlg` `yes`
~ Activate `UI Message Dialog` `yes`
! ------------------------------------------------
!
!...many many more...
!
! ------------------------------------------------
~ Select `mapkey_main` `list_mapkeys` 1 `<space><space>a`
~ Activate `mapkey_main` `ModifyButton`
~ Update `mapkey_record` `inp_name` ` a`
~ Activate `mapkey_record` `OkButton`
~ Activate `uit_cmd_conflict_msgdlg` `yes`
~ Activate `UI Message Dialog` `yes`
! ------------------------------------------------
~ Select `mapkey_main` `list_mapkeys` 1 `<space><space>b`
~ Activate `mapkey_main` `ModifyButton`
~ Update `mapkey_record` `inp_name` ` b`
~ Activate `mapkey_record` `OkButton`
~ Activate `uit_cmd_conflict_msgdlg` `yes`
~ Activate `UI Message Dialog` `yes`
! ------------------------------------------------
!
!...many many more...
!
! ------------------------------------------------
~ Select `mapkey_main` `list_mapkeys` 1 `x<space>`
~ Activate `mapkey_main` `ModifyButton`
~ Update `mapkey_record` `inp_name` `x `
~ Activate `mapkey_record` `OkButton`
~ Activate `uit_cmd_conflict_msgdlg` `yes`
~ Activate `UI Message Dialog` `yes`
! ------------------------------------------------
~ Activate `mapkey_main` `CloseButton`
~ Activate `unsaved_mapkeys` `yes`

Of course I don't write the conversion trail file cs_convert_space_mapkeys.txa by hand; a script generates it automatically from my mapkeys.pro.

 

5. Toggling check buttons in dashboards and dialogs
If you record a mapkey that sets a check button in an open dashboard or dialog, you'll end up with a mapkey line that captures the UI state at recording time.

Set the check button always to true (=1) in a dashboard/dialog:

~ Activate `main_dlg_cur` `maindashInst0.remove_material_cb` 1 ;\

Set the check button always to false (=0) in a dashboard/dialog:

~ Activate `main_dlg_cur` `maindashInst0.remove_material_cb` 0 ;\

But what I usually want is a mapkey that toggles the check button. The trick is simply to remove the 1 or 0 from the mapkey line:

~ Activate `main_dlg_cur` `maindashInst0.remove_material_cb`;\

 

6. Trail shots in mapkeys
When you record mapkeys, you'll generally get lines with trail shots inserted. Example:

mapkey _mapkey_with_trail_shot_ @MAPKEY_LABEL_example_ DLG_PREVIEW_POST_;\
~ Command `ProCmdModelOpen` ;\
~ Trail `` `` `DLG_PREVIEW_POST` `file_open`;

The last line is the recorded trail shot. So, a command like `ProCmdModelOpen` writes the trail shot DLG_PREVIEW_POST on the next line.

I'm not quite sure why trail shots are added to mapkey recordings at all. If you watch your session trail live, you'll see that running this mapkey generates two identical trail shots:

~ Command `ProCmdModelOpen` 
~ Trail `` `` `DLG_PREVIEW_POST` \
`file_open`
~ Trail `` `` `DLG_PREVIEW_POST` \
`file_open`

The first one is written to the session trail by calling `ProCmdModelOpen`; the second comes from the mapkey itself.

So, personally I remove all trail shots from my mapkeys.pro, and I have never come across a case where a trail shot callback was needed in a "normal" Creo session. I might be wrong though, and there may be cases where you do need them in your mapkeys.

 

7. UI-action trail syntax and the selection array size
As far as I know, there is no documentation of the Creo trail syntax, and I guess most of you guys learned it the same way I did: by trial and error with mapkeys and trail files.


It actually took me a while to realise that every line with a UI action is structured in exactly the same way. The scheme is always:

~ Select `relation_dlg` `ParamsPHLay.ParTable` 2 `rowBUW_PROJECT_SHORT` `name`

~ <action_name> `<dialog_name>` `<component_name > ` 12345 `<optional_item_name> ` `<optional_cell_name>`

The names make it fairly obvious, but people sometimes misunderstand the selection array size (the 12345 above). Examples: if you click a radio button, this number will always be 1:

~ Select `new` `Type` 1 `Part`

because in the dialog named `new`, the radio group named `Type` only allows 1 single selection – here the radio button named `Part`.

 

If you select five nodes in the model tree, the selection array size is 5, and the trail line then lists all five node names.

~ Select `main_dlg_cur` `PHTLeft.AssyTree` 5 `node12` `node11` `node10` `node9` `node8` 1

 

Likewise, if you click anywhere in the graphics window, the selection array size will be 9:

~ LButtonArm `main_dlg_cur` `proe_win` 9 286 145 0 1 1214 825 1920 1080 7521460

because with a mouse click you're addressing nine things at once. Put simply: after the "9" follow nine numbers, which is the size of the array:

index[0]: 286     -> X coordinate from the left of the graphics window
index[1]: 145 -> Y coordinate from the top of the graphics window
index[2]: 0 -> 32-bit field representing the state of the keyboard keys
index[3]: 1 -> 16-bit field representing the state of the mouse buttons and spin axis
index[4]: 1214 -> dX size of the graphics window
index[5]: 825 -> dY size of the graphics window
index[6]: 1920 -> dX size of the screen
index[7]: 1080 -> dY size of the screen
index[8]: 7521460 -> time in milliseconds since the Creo session was started

I could go more into detail and explain any other trail line, but it wouldn't be of much use, because Creo automations built on trail files, mapkeys and OS-scripts are prone to crashing.

 

8. Mapkeys can click

It's often said that mapkeys can't do mouse clicks. Technically, that's not entirely true. Of course I understand where people are coming from: if you record a mapkey, you won't record any mouse clicks in the graphics window. If you look at the session trail while recording a mapkey, you'll find that any selections @SEL_REC are converted to @PAUSE_FOR_SCREEN_PICK in the resulting mapkey.


But as far as I know, mapkeys are basically trail trains. Under the hood, the mapkey string is tokenised on ";" into several trail files, which are then played in sequence. Put simply: every line in a mapkey is converted to a separate trail file. And since trail files can click, so can mapkeys.


Example: Creo is very middle-mouse-button-heavy. It's mostly used to spin the model, but I had the bad habit of confirming everything in Creo with a middle-mouse-button click. To stop clicking the middle-mouse-button all day long, I created a simple mapkey that does the click for me:

mapkey sd @MAPKEY_LABELMiddleMouseButton (sd);\
~ MButtonArm `main_dlg_cur` `proe_win` 9 0 0 0 0 0 0 0 0 0;\
~ MButtonDisarm `main_dlg_cur` `proe_win` 9 0 0 0 0 0 0 0 0 0;

This is probably one of my most-used mapkeys in Creo, since I use it whenever I need to confirm something in a sketch, feature, assembly, dialog default button, etc. You've probably noticed that I've set all values in the selection array to 0 0 0 0 0 0 0 0 0, because for a confirming MMB click I really don't care where in the graphics window the click happens. But it is still a click, executed by a mapkey.


9. OS-script mapkeys without the flashing cmd window (Creo 13)
With Creo 13 OS-script mapkeys do no longer flash the cmd console window on screen. With that, you can, for example, use OS-scripts to extract information from the live session trail.


In the following mapkey I copy the name of the model selected in the graphics window/model tree to the clipboard:

! Replace “C:\\startup\\trailfiles” with your trail_dir directory.

mapkey cd @MAPKEY_LABELCopy Name to Clipboard (cd);\
@SYSTEM\@echo off\n\
powershell -NoProfile -Command "[IO.Path]::GetFileNameWithoutExtension( \
(Get-Content (Get-ChildItem 'C:\\startup\\trailfiles\\trail.txt.*' | \
Sort-Object LastWriteTime | Select-Object -Last 1) | \
Select-String '^!\\S+\\.(PRT|ASM)' | Select-Object -Last 1 | \
ForEach-Object Line).TrimStart('!') ) | Set-Clipboard";

 

10. Mapkey to always show the navigator (Creo 13)
Some commands in Creo do toggle the visibility state of UI components. In case of datums like planes, axes, points, csys you have a config option you can change in the options dialog to set them to a defined state. Others like the model tree navigator have no config option available and thus they toggle with every call of a mapkey.

The trick to set the navigator to be always visible with a mapkey: Toggle the state, then read and evaluate the last line of the live session trail, then run a one-line trail file to toggle the navigator again if necessary.

! Replace “C:\\startup\\trailfiles” with your trail_dir directory.

mapkey nv @MAPKEY_LABELShow Navigator (nv);\
~ Command `ProCmdNavigatorBtn`;\
%_Command_WriteShowNavigatorTxa;\
%_Command_RunShowNavigatorTxa;

mapkey _Command_WriteShowNavigatorTxa @MAPKEY_LABELWrite show navigator txa;\
@SYSTEM\@echo off\n\
>show_navigator.txa echo !trail file version No. 2123\n\
powershell -NoProfile -Command "exit ((sls \
'ProCmdNavigatorBtn` +([01])' \
(dir 'C:\\startup\\trailfiles\\trail.txt.*'|sort LastWriteTime)[-1] \
)[-1].Matches[0].Groups[1].Value)"\n\
if not errorlevel 1 (>>show_navigator.txa echo \~ Command `ProCmdNavigatorBtn`);

mapkey _Command_RunShowNavigatorTxa @MAPKEY_LABELRun show navigator txa;\
~ Command `ProCmdUtilTrailTrain`;\
~ Activate `file_open` `Current Dir`;\
~ Update `file_open` `Inputname` `show_navigator.txa`;\
~ Command `ProFileSelPushOpen_Standard@context_dlg_open_cmd`;


11. Statistics from the trail file
Since every trail file states its start time in the header, you can take advantage of the fact that every mouse click comes with a timestamp. I use the trail file analyser to visualise the stats, simply by dragging and dropping my trail files into it:

  • How much time did I spend in Creo over the day? (as a toolkit developer I have Creo running, but I spend most time in the IDE)
  • How long did it take to load a Creo assembly?
  • Which mapkeys did I use most often?
  • How many LMB/MMB/RMB clicks were executed?

 

To reiterate: PTC does not support editing mapkeys or trail files. But maybe some these tips will help to get your day-to-day work done faster.

 

Kind regards,

Christoph