Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
HI,
I am setting up mapkey to create a named view. I can make the mapkey for creating the thumbnail view easily. See the code below.
mapkey tn @MAPKEY_NAMEcreated the thumbnail named view for IFS thumbnail;\
mapkey(continued) @MAPKEY_LABELthumbnail view;~ Command `ProCmdViewVisTool`
mapkey(continued) ~ Select `visual_dlg0` `RadioSelApplMgr` 1 `orientation`;\
mapkey(continued) ~ Activate `visual_dlg0` `ZoneNmCreate`;\
mapkey(continued) ~ Update `visual_dlg0` `Table_INPUT` `thumbnail`;\
mapkey(continued) ~ Activate `visual_dlg0` `Table_INPUT`;~ Activate `visual_dlg0` `CloseBtn`;
Now what I would like to do is set up this mapkey so that if you use it again, it saves the view. I have done a little bit with combining mapkeys to get them to work in different contexts, but that works because the one not being used simply gets skipped over in the wrong context. If I were to make another mapkey to save the current view and then smoosh them together, the first one would start working and screws things up. Is there a way to check the named views and if "thumbnail" already exists, then it saves the view, and if it doesn't it creates it?
Thanks,
Brandon
Solved! Go to Solution.
I did not record 2 mapkeys. I just recorded 1. Steps to reproduce: Without the mapkey recorder on, create a view named whatever you want. Then turn the mapkey recorder on and go through the steps to save the view. Type in the same name as you did before with the recorder off. When you type in the same name the CAD software will ask if you want to override the old view. You indicated you wanted this, so click yes.
If the view has not been created, it will just skip over the yes dialog box.
The mapkey "language" changes for each version. I was able to get what you are requesting working in Creo 2 by typing in the name thumbnail and then just clicking "yes" when it prompted me if I wanted to save. My mapkey looks like this:
mapkey(continued) ~ Command `ProCmdViewOrient` ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `thumbnail`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `thumbnail`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;Yes;\
mapkey(continued) ~ Activate `orient` `OkPB`;
I forgot to mention that I created the thumbnail name first and then recorded the mapkey afterwards typing in the name thumbnail again. This is what gets you the save prompt.
did you combine the 2 mapkeys into one? So that when I type "tn" it will do either? Or did you just create another mapkey? Is the code that you pasted a continuation of mine? Please paste the whole mapkey here so I can see what you are doing.
I did not record 2 mapkeys. I just recorded 1. Steps to reproduce: Without the mapkey recorder on, create a view named whatever you want. Then turn the mapkey recorder on and go through the steps to save the view. Type in the same name as you did before with the recorder off. When you type in the same name the CAD software will ask if you want to override the old view. You indicated you wanted this, so click yes.
If the view has not been created, it will just skip over the yes dialog box.
I must be missing something. When I create a new view with the same name, it just doesn't accept it.
here's what I am typing in, and then when I hit enter to accept the name, it simply reverts back to view0001 with no dialogue box.
Is there a config setting that needs to be changed to allow this?
Brandon
I figured it out now. you have to click "save" and then retype it. I was trying to create a new view with the same name and it wasn't working, My mistake. Thanks for the help.
but I still didn't get override screen on my system. I'm not sure what the difference was on that one.
I wasn't going through the view manager. I was using the reorient through the named views:
That makes sense. Looks like there is more than one way to make it work. I haven't made too many named views before, so I'm not that familiar with all of the ways that you can do it.