Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Dear All,
In Wildfire I had set-up mapkey to toggle Snap to Grid setting On or Off using single key. It looked as follows:
mapkey $F5 @MAPKEY_LABELEnable snap to grid setting;\
mapkey(continued) @MAPKEY_NAMEEnable snap to grid setting;~ Command `ProCmdEnvFull` ;\
mapkey(continued) ~ Activate `env_dlg` `grid_snap` 1 ;~ Activate `env_dlg` `OK_`;
When you hit F5 function key it either switched on Snap to grid or it turned it off. That way you could easily toggle this option in drawing or in sketcher.
Now, in Creo Snap to grid got other type of field code. When I tried to implement the old mapkey to perform the same function, I found out following:
- As this is UI setting, Creo always shows you pop-up for saving environment settings into UI file (unless you check "Do not show me this dialog again"). To implement mapkey to all of our users, this is rather annoying as I would have to assure that all the workstations have this setting checked.
- Snap to grid option cannot be toggled ON/OFF using single key, since it has either value of 0 or 1, thus mapkey works only one-way. That means, I should associate two function keys, one to toggle Snap to grid OFF and other to toggle it ON.
In Creo the code for both mapkeys looks like the following:
mapkey $F5 @MAPKEY_LABELGrid snap on;@MAPKEY_NAMEEnable snap to grid setting;\
mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg`;\
mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `sketch_layouts`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `sketch_layouts.grid_snap.lay_instance` 1 \
mapkey(continued) ;~ Activate `ribbon_options_dialog` `OkPshBtn`;
mapkey $F6 @MAPKEY_LABELGrid snap off;\
mapkey(continued) @MAPKEY_NAMEDisable snap to grid setting;~ Command `ProCmdRibbonOptionsDlg`;\
mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `sketch_layouts`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `sketch_layouts.grid_snap.lay_instance` 0 \
mapkey(continued) ;~ Activate `ribbon_options_dialog` `OkPshBtn`;
Do you guys have any solution for how to achieve the same functionality as it was implemented in Wildfire without having to mess with suppressing dialog boxes on all of the workstations? Or, do you have any better code for that kind of mapkey?
Thanks in advance.
Jurij Škraba
Research & Developement Department for
Hydromechanical Equipment
LitostrojPower | Production of Power
Generation and Industrial Equipment | http://www.litostrojpower.eu
Create an individual file for each operation.
Each file will define the same F5, but different operations.
At the end of each mapkey have it load the other file. It will toggle the mapkey definition from one to the other.