Mapkey for making a change to all pages of a drawing
Has anyone had any luck creating a mapkey to make changes to each page of a drawing?
Case I'm working with is putting a new symbol on each and every page using Creo 2.0. Typically an older legacy drawing, or one that has already been created. Symbol also has options which is another battle but one step at a time.
I want the mapkey to essentally go to page 1, make change, go to page 2, make change... etc until each page is changed. In programming it would be a loop until it reaches the last page then stop. Ideally this lends itself to JLink or Toolkit, which I may get to that point, but I'm starting out with mapkeys.
So far this is what I have is something like this where it just keeps iterating until some predetermined maximum page count.
mapkey changepages @MAPKEY_LABEL Change Pages;\ mapkey(continued) ~ Command `ProCmdDwgGotoSheet`;\ mapkey(continued) ~ Update `gotosheet` `InpPagenum` `1`;\ mapkey(continued) ~ FocusOut `gotosheet` `InpPagenum`;\ mapkey(continued) ~ Activate `gotosheet` `Goto`;\ mapkey(continued) ~ %InsertSymbol;\ mapkey(continued) ~ Update `gotosheet` `InpPagenum` `2`;\ mapkey(continued) ~ FocusOut `gotosheet` `InpPagenum`;\ mapkey(continued) ~ Activate `gotosheet` `Goto`;\ mapkey(continued) ~ %InsertSymbol;\ mapkey(continued) ~ Update `gotosheet` `InpPagenum` `3`;\ mapkey(continued) ~ FocusOut `gotosheet` `InpPagenum`;\ mapkey(continued) ~ Activate `gotosheet` `Goto`;\ mapkey(continued) ~ %InsertSymbol;\ ... mapkey(continued) ~ Update `gotosheet` `InpPagenum` `99`;\ mapkey(continued) ~ FocusOut `gotosheet` `InpPagenum`;\ mapkey(continued) ~ Activate `gotosheet` `Goto`;\ mapkey(continued) ~ %InsertSymbol;\ mapkey(continued) ~ Activate `gotosheet` `Close`;
It will throw errors for the pages that don't exist, but doesn't seem to cause harm...yet. Of course the second you make a 99 page mapkey someone will find a 100 page drawing, and then a 101 page drawing ... and so on.
I also tried using the "next" button but then you get caught changing pages that were already changed and still stuck to some pre-determined limit. So that would depend on what kind of change is being done if you can loop over existing pages.
Anyone have any better luck or ideas? Time to break out JLink/Toolkit (and learn it)?

