⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testmain.c

📁 Pro.TOOLKIT.Wildfire插件设计.配套光盘-141M.zip
💻 C
📖 第 1 页 / 共 4 页
字号:
/*====================================================================*\FILE	: TestMain.cPURPOSE	: Top level structure of application for testing Pro/TOOLKITHISTORY..DATE      BUILD   AUTHOR    MODIFICATIONS25 Jan 96 G-03-03 Alistair   $$1   First version.21 Feb 96 G-03-04 Michael    $$2   Added prodev_menu.h & TestMfg.h11 Mar 96 G-03-05 dmp        $$3   Added selection testing11 Mar 96 G-03-06 dmp	     $$4   Added Parameter testing01-Apr-96 G-03-08 dmp        $$5   Added External object testing19-Apr-96 G-03-11 Alistair   $$6   Added Notify10-Jun-96 G-03-17 mgs,Igor   $$7   Added Simplified reps and features13-Jun-96 G-03-17 mgs        $$8   Corrected menu error13-Jun-96 G-03-18 Steve      $$9   Added Section menu item10-Jul-96 G-03-19 mgs        $$10  Added Misc menu item26-Aug-96 H-01-05 Xuekai     $$11  Modify due to change to ProMdl23-Sep-96 H-01-10 Xuekai     $$12  Comment out section and feature creation30-Sep-96 H-01-11 DXU        $$13  Added appdata testing.09-Oct-96 H-01-12 mgs        $$14  Added declarations to fix compile errors14-Oct-96 H-01-13 Bojan      $$15  Add Set Up menu.21-Oct-96 H-01-14 Steve      $$16  Activated Section stuff25-Oct-96 H-01-14 Bojan      $$17  Added Done/Return to part and asm menus.07-Nov-96 H-01-16 Dxu        $$18  added pt_family menu12-Nov-96 H-01-16 Steve      $$19  Changes section func12-Nov-96 H-01-16 Bojan      $$20  Added MfgNew()15-Nov-96 H-01-17 CHI        $$21  Added Done to tkmain menu19-Nov-96 H-01-17 dmp        $$22  Use TOOLKIT menu functions20-Nov-96 H-01-17 mgs        $$23  Obselete pt_mfg (old style)22-Nov-96 H-01-18 mgs        $$24  Use -tkmfg button to call gen elem tree code17-Dec-96 H-01-21 Igor       $$25  Remove -Feature button  from part mode				  Removed -Family table			          Added Obj Window and View buttons19-Dec-96 H-01-21 mgs        $$26  Removed Family table includes19-Jan-97 H-01-21 Pavel      $$27  Added some functions19-Jan-97 H-01-21 Alexey     $$28  Added some functions21-Jan-97 H-01-24 Igor       $$29  Change include Procore.h to ProCore.h21-Jan-97 H-01-24 Jerry      $$30  Conflict avoidance: changed Misc menu item to -Misc29-Jan-97 H-01-26 CHI        $$31  \n in Welcome msg05-Mar-97 H-01-27 Igor       $$32  use PRO_PATH_SIZE for a path string                                   in ProTestChangeDir()07-Feb-97 H-01-28 Pavel      $$33  Added "-components: button into tkasm.mnu06-Mar-97 H-01-28 Pavel      $$34  Added TkDiagram button into diagram.mnu28-Mar-97 H-01-30 Pavel      $$35  Added TkLayout button into diagram.mnu20-May-97 H-03-11 Alexey     $$36  Added -Fam Table -Collection  buttons22-May-97 H-03-12 Pavel      $$37  Added -Relations button29-May-97 H-03-13 Pavel      $$38  Added -LayerR18 button16-Jun-97 H-03-14 Alexey     $$39  Added -Interface button05-Jul-97 H-03-16 Pavel      $$40  Added -TkMold menu13-Jul-97 H-03-17 Pavel	     $$41  Added ProTestProcstep call28-Jul-97 H-03-17 amin       $$42  Update arg list for ProCmdAction15-Sep-97 H-03-22 Pavel      $$43  Replace Pro/D on Pro/E26-Sep-97 H-03-24 Pavel	     $$44  Added -TkDrawing menu06-Oct-97 H-03-25 Pavel	     $$45  Type cast12-Oct-97 H-03-26 Pavel      $$46  Move ProTestMoldLayoutMenu() to				   TestMoldLayout.c16-Oct-97 H-03-27 Pavel      $$47  Added -SimpRep in part menu04-Nov-97 H-03-29 Pavel      $$48  Corrected TEST_CALL_REPORTs25-Nov-97 H-03-31 CHI        $$49  ProLayerXxx R18->R19 (since H-03 is now R20)12-Jan-98 H-03-36 ljl        $$50  Changed menubar function names                       ProCmdAddAction() -> ProCmdActionAdd()                       ProMenuAddPushButton() -> ProMenubarmenuPushbuttonAdd()20-Jan-98 H-03-38 Pavel      $$51  Added Menubar menu12-Feb-98 H-03-39 aab        $$52  Removed printfs17-Mar-98 H-03-41 Alexey     $$53  Call ProUtilCommandLineParse() to retrieve 				   application parameters from command line27-Aug-98 I-01-18  dpek      $$54 Renamed mold layout menu10-Sep-98 I-01-19  Alexey    $$55 Added TkFEM menu 15-Oct-98 I-01-23  Alexey    $$56 Added  TkCavityLayout menu.                                   Removed #include pd_proto.h03-Nov-98 I-01-25  Akula     $$57 Added a new menu function10-Nov-98 I-01-26  Pavel     $$58 Added -Xsec to part and assembly menus07-Dec-98 I-01-27  Alexey    $$59 Added -TkWelding menu04-May-99 I-03-09  Alexey    $$60 Added -TkMoldProd menu07-Jun-99 I-03-10  CHI       $$61 Allow variant version02-Jun-99 I-03-10  aab       $$62 Added External Analysis registration and menu29-Jul-99 I-03-12+ CHI       $$63 remove call to ProIsPTModeler (obsolete)27-Sep-99 I-03-16  akh       $$64 Fix the message: "TEST %s" -> "TEST %0s"28-Jul-99 I-03-20  akh       $$65 Added -Dimension menu06-NOV-99 I-03-20  integ     $$66 Compile error.13-Nov-99 I-03-21  Shturm    $$67 Fixed access to FEM export menus.29-Feb-00 J-01-05  CHI       $$68 cleanup from #6301-Oct-01 J-03-09  JNM       $$69 added menu buttons to the Utilities menu14 Mar 02 J-03-20+ ACT       $$70 Fixed failure due to change in external                                  version name from "2002" to "Wildfire"14 May-02 J-03-25  PJN       $$71 Created PT_EXAMPLES menus.17 May-02 J-03-25+ JCN       $$72 Fix cmd creation from ##71\*====================================================================*//*--------------------------------------------------------------------*\Pro/TOOLKIT includes\*--------------------------------------------------------------------*/#include<ProToolkit.h>
#include "ProObjects.h"
#include "ProMdl.h"
#include "ProMenu.h"
#include "ProMenuBar.h"
#include "ProMessage.h"
#include "ProUtil.h"
#include "ProCore.h"/*--------------------------------------------------------------------*\Pro/DEVELOP includes\*--------------------------------------------------------------------*//*--------------------------------------------------------------------*\C System includes\*--------------------------------------------------------------------*//*--------------------------------------------------------------------*\Application includes\*--------------------------------------------------------------------*/#include "TestError.h"#include "UtilMessage.h"#include "TestSelect.h"#include "TestParams.h"#include "TestExtobj.h"#include "TestDbms.h"#include "TestNotify.h"#include "TestSimpRep.h"#include "TestSetup.h"#include "TestFeat.h"#include "TestSect.h"#include "TestMisc.h"#include "TestGenedata.h"#include "TestMenu.h"#include "UtilString.h"#include "TestAnalysis.h"/*--------------------------------------------------------------------*\Application macros\*--------------------------------------------------------------------*//*--------------------------------------------------------------------*\Application data types\*--------------------------------------------------------------------*//*--------------------------------------------------------------------*\Application global/external data\*--------------------------------------------------------------------*//*====================================================================*\    FUNCTION :	TestAccessDefault()    PURPOSE  :   enable access to the -Main button	\*====================================================================*/static uiCmdAccessState TestAccessDefault(uiCmdAccessMode access_mode){  return (ACCESS_AVAILABLE);}/*====================================================================*\    FUNCTION :  TestNoAccess()    PURPOSE  :   disable access any button\*====================================================================*/static uiCmdAccessState TestNoAccess(uiCmdAccessMode access_mode){  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :	TestDrawingAccess()    PURPOSE  :   enable access to the Drawing button	\*====================================================================*/static uiCmdAccessState TestDrawingAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      ProMdlTypeGet(mdl, &mdltype);       if (mdltype == PRO_MDL_DRAWING) 	return (ACCESS_AVAILABLE);      else 	return (ACCESS_UNAVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :	TestDiagramAccess()    PURPOSE  :   enable access to the Diagram button	\*====================================================================*/static uiCmdAccessState TestDiagramAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      status = ProMdlTypeGet(mdl, &mdltype);       if (status == PRO_TK_NO_ERROR && mdltype == PRO_MDL_DIAGRAM) 	return (ACCESS_AVAILABLE);      else 	return (ACCESS_UNAVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :	TestReportAccess()    PURPOSE  :   enable access to the Report button	\*====================================================================*/static uiCmdAccessState TestReportAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      status = ProMdlTypeGet(mdl, &mdltype);       if (status == PRO_TK_NO_ERROR && mdltype == PRO_MDL_REPORT) 	return (ACCESS_AVAILABLE);      else 	return (ACCESS_UNAVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :	TestLayoutAccess()    PURPOSE  :   enable access to the Layout button	\*====================================================================*/static uiCmdAccessState TestLayoutAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      ProMdlTypeGet(mdl, &mdltype);       if (mdltype == PRO_MDL_LAYOUT) 	return (ACCESS_AVAILABLE);      else 	return (ACCESS_UNAVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :  TestPartAccess()    PURPOSE  :   enable access to the Part button\*====================================================================*/static uiCmdAccessState TestPartAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      status = ProMdlTypeGet(mdl, &mdltype);      if (status == PRO_TK_NO_ERROR && mdltype == PRO_MDL_PART)        return (ACCESS_AVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :  TestAsmAccess()    PURPOSE  :   enable access to the Asm button\*====================================================================*/static uiCmdAccessState TestAsmAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      status = ProMdlTypeGet(mdl, &mdltype);      if (status == PRO_TK_NO_ERROR && mdltype == PRO_MDL_ASSEMBLY)        return (ACCESS_AVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :  TestAsmAccess()    PURPOSE  :   enable access to the Asm button\*====================================================================*/static uiCmdAccessState TestMfgAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      status = ProMdlTypeGet(mdl, &mdltype);      if (status == PRO_TK_NO_ERROR && mdltype == PRO_MDL_MFG)        return (ACCESS_AVAILABLE);    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :  TestAsmProcessPlanAccess()    PURPOSE  :   enable access to the Asm Process button\*====================================================================*/static uiCmdAccessState TestAsmProcessPlanAccess(uiCmdAccessMode access_mode){  ProMdl mdl;  ProError status;  ProMdlType mdltype;  ProMdlsubtype subtype;  status = ProMdlCurrentGet(&mdl);  if (status == PRO_TK_NO_ERROR)    {      status = ProMdlTypeGet(mdl, &mdltype);      if (mdltype == PRO_MDL_ASSEMBLY && status == PRO_TK_NO_ERROR)      {        status = ProMdlSubtypeGet(mdl,&subtype);        if (subtype == PROMDLSTYPE_ASM_PROCPLAN && status == PRO_TK_NO_ERROR)            return (ACCESS_AVAILABLE);      }    }  return (ACCESS_UNAVAILABLE);}/*====================================================================*\    FUNCTION :  TestAsmMoldLayoutAccess()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -