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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

fancy mapkey help...

ptc-3165095
1-Newbie

fancy mapkey help...

I have created a mapkey to add the parameter rc_model_type and set it to a value. I then have the same mapkey run modelcheck. This works fine. The problem I have is if the user runs the same mapkey again it creates a new parameter call "value" from earlier and then stops. What I would like to do is put in a if else statement. If rc_mmodel_type = "value" go to run modelcheck else create parameter rc_model_type and set it to "value" I would guess this is not possiable but any input would be great.
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

Wayne, I think you should be able to do this within the Relations definition, particularly with the use of a dummy variable. Do something like the following: set the rc_model_type to "null", and create a second parameter called temp. Now use your mapkey to set the value of temp instead of rc_model_type. Then add these Relations: IF rc_model_type~="null" rc_model_type=temp ENDIF [~= means is not equal to] Good luck! David

Oops! Just reread my post. It should have been "==" (is equal to), not "~=" (is not equal to). That way, the first time you assign a value to "temp" ("rc_model_type" still equal to "null"), "rc_model_type" will change to that first value assigned to "temp". After that, no subsequent changes to "temp" will affect "rc_model_type".
Top Tags