In WF5 I recorded mapkey that turned off pre-highlighting.
I then followed some instructions I found to allow the key to turn on or off the pre-highlight regardless of its current state - something like removing a "1" from the config.pro text - or changing it to a negative value or some such genius thing.
I wonder how the gurus learn this stuff.
Anyway, here I am in CR2 trying to toggle the display of a layer in a mapkey. Basically, I'd like to assign F4 to turn on and off my "curves" layer.
I'd also like to get my pre-selection highlight to behave the same way again.
Is that still possible in Creo? If so, can someone remind me how to force a toggle?
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Long ago, I recorded mapkeys for toggling various on/off controls in both states. I compared the two and found they were identical except the one that turned it on had a 1 in a certain spot and the one that turned it off had a 0. On a whim, I removed the 1 or 0, saved the text and gave it a whirl. I was a bit surprised, pleasantly, to find that it worked.
The problem you'll have with layers is that a layer can have 3 states, not 2 (shown, hidden and isolated). Because of that, I don't think you're going to get a single toggle mapkey to work. You'll need to do the trick David mentioned where the mapkey sets the state you want then loads a new config file that re-defines the mapkey.