Running 2 mapkeys on Creo start
Hi all,
When I start Creo (4.0), I let it open and execute a trail file to init some things, depending on the project I am working on.
The main thing it does, is to execute 2 mapkeys.
One mapkey sets the current working directory of this specific project.
The other mapkey opens the main assembly of this project.
This trail file looks like this:
!trail file version No. 1400
!Pro/ENGINEER TM Wildfire 4.0 (c) 2010 by Parametric Technology Corporation All Rights Reserved.
!!!! Resize window
~ Activate `main_dlg_cur` `main_dlg_cur`
~ Resize `main_dlg_cur` `main_dlg_cur` \
4 0.000000 0.000000 48.759963 26.053753
!!!! Play the 'init' mapkey
~ Command `ProCmdUtilMacros` 1
~ Select `mapkey_main` `list_mapkeys` 1 `init`
~ Activate `mapkey_main` `RunButton`
~ Activate `mapkey_main` `CloseButton`
!End of Trail File
It opens the 'Mapkey' dialog box, selects the 'init' mapkey and runs this.
Then closes the Mapkey dialog box.
The thing is ... this doesn't work. The 'init' mapkey is not run.
It DOES work when I edit the trail file by removing the Close command.
So remove this line:
~ Activate `mapkey_main` `CloseButton`
Then init mapkey is executed correctly, but the Mapkey Dialog Box remains open, which I don't like because then I have to manually close it.
So it looks like the trail file does not wait until the 2 mapkeys have finished their job. It closes the Mapkey box too early, interrupting the 2 mapkeys (or prevents them from even executing).
Can anybody give any tips or work-arounds to have the 2 mapkeys executed and the Mapkey box closed?
Oh, the reason that those 2 separate mapkeys exist, is that I often use them while working on the project. To quickly open the main assembly and to quickly go back to the project working directory (in case I temporarily set another working directory).
So I change the definition of those 2 mapkeys for each of my projects.
Init mapkey is nothing more than:
mapkey init %sww;%om;

