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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

mapkey - how to force a toggle

nrollins
1-Newbie

mapkey - how to force a toggle

Hello



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?



Thanks!



-Nate


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.
2 REPLIES 2

Create two mapkeys - one that turns it on; one that turns it off.

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.

--
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
Top Tags