/*
Copyright (c) 2019 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.
*/
/*--------------------------------------------------------------------*\
Pro/Toolkit includes -- include this first
\*--------------------------------------------------------------------*/
#include <ProMenu.h>
#include <PTMechExamples.h>
/*=============================================================*\
FUNCTION : PTMechExLoadOper
PURPOSE : Menu for load.
\*=============================================================*/
ProError PTMechExLoadOper()
{
int menu_id, action;
ProError status;
status = ProMenuFileRegister ("MechLoad", "mload.mnu", &menu_id);
PT_TEST_LOG_SUCC ("ProMenuFileRegister");
status = ProMenubuttonActionSet ("MechLoad", "-StructureLoad", (ProMenubuttonAction)PTMechExStructLoadOper, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("MechLoad", "-ThermalLoad", (ProMenubuttonAction)PTMechExThermLoadOper, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("MechLoad", "-Done/Return", (ProMenubuttonAction)PTMechExDeleteAndPop, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("MechLoad", "MechLoad", (ProMenubuttonAction)PTMechExDeleteAndPop, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenuPush ();
PT_TEST_LOG_SUCC ("ProMenuPush");
status = ProMenuCreate (PROMENUTYPE_MAIN, "MechLoad", &menu_id);
PT_TEST_LOG_SUCC ("ProMenuCreate");
status = ProMenuProcess ("MechLoad", &action);
PT_TEST_LOG_SUCC ("ProMenuProcess");
return PRO_TK_NO_ERROR;
}
/*=============================================================*\
FUNCTION : PTMechExStructLoadOper
PURPOSE : Menu for structure load.
\*=============================================================*/
ProError PTMechExStructLoadOper()
{
int menu_id, action;
ProError status;
status = ProMenuFileRegister ("StructureLoad", "sload.mnu", &menu_id);
PT_TEST_LOG_SUCC ("ProMenuFileRegister");
status = ProMenubuttonActionSet ("StructureLoad", "--ForceLoad", (ProMenubuttonAction)PTMechExForceLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "--PressureLoad", (ProMenubuttonAction)PTMechExPressureLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "--BearingLoad", (ProMenubuttonAction)PTMechExBearingLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "--GravityLoad", (ProMenubuttonAction)PTMechExGravityLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "--CentrifugalLoad", (ProMenubuttonAction)PTMechExCentrifLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "--StructTempLoad", (ProMenubuttonAction)PTMechExStructtempLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "--Done/Return", (ProMenubuttonAction)PTMechExDeleteAndPop, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("StructureLoad", "StructureLoad", (ProMenubuttonAction)PTMechExDeleteAndPop, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenuPush ();
PT_TEST_LOG_SUCC ("ProMenuPush");
status = ProMenuCreate (PROMENUTYPE_MAIN, "StructureLoad", &menu_id);
PT_TEST_LOG_SUCC ("ProMenuCreate");
status = ProMenuProcess ("StructureLoad", &action);
PT_TEST_LOG_SUCC ("ProMenuProcess");
return PRO_TK_NO_ERROR;
}
/*=============================================================*\
FUNCTION : PTMechExThermLoadOper
PURPOSE : Menu for thermal load.
\*=============================================================*/
ProError PTMechExThermLoadOper()
{
int menu_id, action;
ProError status;
status = ProMenuFileRegister ("ThermalLoad", "tload.mnu", &menu_id);
PT_TEST_LOG_SUCC ("ProMenuFileRegister");
status = ProMenubuttonActionSet ("ThermalLoad", "--HeatLoad", (ProMenubuttonAction)PTMechExHeatLoad, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("ThermalLoad", "--Done/Return", (ProMenubuttonAction)PTMechExDeleteAndPop, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenubuttonActionSet ("ThermalLoad", "ThermalLoad", (ProMenubuttonAction)PTMechExDeleteAndPop, NULL, 0);
PT_TEST_LOG_SUCC ("ProMenubuttonActionSet");
status = ProMenuPush ();
PT_TEST_LOG_SUCC ("ProMenuPush");
status = ProMenuCreate (PROMENUTYPE_MAIN, "ThermalLoad", &menu_id);
PT_TEST_LOG_SUCC ("ProMenuCreate");
status = ProMenuProcess ("ThermalLoad", &action);
PT_TEST_LOG_SUCC ("ProMenuProcess");
return PRO_TK_NO_ERROR;
}