cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Mapkey that updates config.pro without configuration editor UI popping up?

MC_10725407
8-Gravel

Mapkey that updates config.pro without configuration editor UI popping up?

Hello all,

 

I've been trying to create a mapkey or macro that updates my config,pro file in Creo Parametric 7. I have one right now, but it briefly opens the configuration editor UI. I more or less want the config.pro file to constantly update in the background and this is part of my plan in that. I've set visible_mapkeys no and it didn't do anything. Heres the mapkey I have now:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

mapkey qe @MAPKEY_LABEL reload_config;\
mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.Open`;\
mapkey(continued) ~ Command `ProFileSelPushOpen_Standard@context_dlg_open_cmd` ;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If anyone has an easier way of getting it to constantly update or not show the UI, I'd appreciate any insight.

 

 

 

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
tbraxton
22-Sapphire I
(To:MC_10725407)

Read through this thread which I think covers the current state of Creo in the context of your question.  If you still have questions after reviewing it, post them here.

 

Mapkeys creating flashing windows - PTC Community

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

View solution in original post

7 REPLIES 7
tbraxton
22-Sapphire I
(To:MC_10725407)

Read through this thread which I think covers the current state of Creo in the context of your question.  If you still have questions after reviewing it, post them here.

 

Mapkeys creating flashing windows - PTC Community

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Thanks for responding! I actually saw this thread and I guess I posed my question wrong. I'm not looking for the windows to not show up since we know that's not possible according to that thread. Instead, is there just a mapkey that directly updates the config? So instead of hiding the windows, there just wouldn't be a prompt to open the ui in the first place.

tbraxton
22-Sapphire I
(To:MC_10725407)

Currently I do not believe this to be possible with the ribbon-based UI. Mapkeys only have access to elements in the UI when recording them. If you could figure out a way to load the config using the legacy menu manager UI elements (old menu based UI), then the visible mapkeys config option should prevent any windows from being invoked. You will have to research if the needed menu manager elements are still functional. The easiest way to do this is to open a Pre-Wildfire release of Pro/E and record the mapkey to load a config file (or get the mapkey from an old config file and test it).

 

You can access some of the legacy menus in Creo but not all.

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Thank you, I'll look into this more

I have a mapkey to similar to the one you're trying to make. It allows me to reimport my config after I make changes to it. A few things to consider:

 

  • This mapkey doesn't constantly run so I have to manually run it to update my config after I make a change
  • You need to specify the path to your config file in the mapkey. We load multiple configs on startup with a launcher and the one I can overwrite in session is my personal config. If you have something similar, it's the one you'll probably want to point to. This is the hardest part about making the mapkey work.
  • The mapkey is really useful for developing new mapkeys or testing settings but we eventually move them to the corporate config. Settings are harder to test than mapkeys and often require a restart. Config.sup settings can't be changed with this mapkey.

 

Here are the clicks that the mapkey performs:

 

  1. File
  2. Options
  3. Configuration Editor
  4. Import/Export 
  5. Import configuration file (a dialog appears)
  6. Browse to file
  7. Select file
  8. Open
  9. OK (a dialog appears)
  10. No


mapkey UPCON @MAPKEY_LABELIMPORT NEWLY SAVED PERSONAL CONFIG;\
mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg` ;\
mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\
mapkey(continued) ~ Select `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) ~ Select `file_open` `Ph_list.Filelist` 1 `configs-wc`;\
mapkey(continued) ~ Activate `file_open` `Ph_list.Filelist` 1 `configs-wc`;\
mapkey(continued) ~ Select `file_open` `Ph_list.Filelist` 1 `config.pro`;\
mapkey(continued) ~ Activate `file_open` `Ph_list.Filelist` 1 `config.pro`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\
mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;

 

Here's the trail output if you want to use it to create your mapkey:

 

!playing mapkey upcon
~ Command `ProCmdRibbonOptionsDlg`
!ODUI external UI session start for device : ribbon_options_dialog
~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`
~ Select `ribbon_options_dialog` `ConfigLayout.ImportExportBtn`
~ Activate `ribbon_options_dialog` `ConfigLayout.Open`
< 2 0.118519 178 0 0 100 1920 0 0 1080 13
~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` \
`file_open`
~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` \
`file_open`
~ Select `file_open` `Ph_list.Filelist` 1 `configs-wc`
~ Activate `file_open` `Ph_list.Filelist` 1 `configs-wc`
~ Select `file_open` `Ph_list.Filelist` 1 `config.pro`
~ Activate `file_open` `Ph_list.Filelist` 1 `config.pro`
~ Activate `ribbon_options_dialog` `OkPshBtn`
! UITools Msg Dialog Future: warning
! : The configuration settings that you have made will be
! : applied to the current session only.
! :
! : Do you want to save settings to a configuration file?
! :
! : Note: user customization will be automatically
! : saved to your profile directory.
~ Activate `UITools Msg Dialog Future` `no`
!ODUI external UI session stop.

 

 

Thank you for your response! The mapkey that I have now more or less does what yours does. What I'm trying to do is not have the UI menus flash briefly when I execute the mapkey.

tbraxton
22-Sapphire I
(To:MC_10725407)

This is what you are stuck with in Creo until PTC implements a fix to the open call I have with them as documented in the thread I refer to above in my initial response.

 

This sequence is loading a config file using a mapkey and you will see the windows invoked. Menu manager commands are the only way I can think of to avoid this currently with mapkey functionality.

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
Announcements


Top Tags