欢迎来到天天文库
浏览记录
ID:14693322
大小:323.00 KB
页数:18页
时间:2018-07-29
《caa用户界面开发——实例说明(catia二次开发)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、用户界面开发——实例说明——CreatingaWorkbench一、目标1.1目标Showinghowtocreateaworkbenchtobeaddedtoagivenworkshop.1.2显示界面(workbench)Liketheworkshop,theworkbenchisanobjectthatgathersthecommandstoworkonthedocumentandarrangethemintoolbarsandmenus.1.3命令标签(commandheader)Commandheadersareusedtomakethelin
2、kbetweentheworkbenchandthecommands.二、CAAAfrGeoCreationWbench实例说明2.1功能TheCAAAfrGeoCreationWbenchusecasecreatesaworkbenchnamedCAAGeometricalCreationfortheCAAGeometrydocument.Itsspecificationscovermostofthecasesyouwillmeet.Twotoolbarsareprovided:TheSolidstoolbar.Itincludesfivenewcom
3、mands:Cuboid,Sphere,Torus,andCylinder1and2.TheSurfacestoolbar.Itincludesthreenewcommands:RevolutionSurface,NurbsSurface,andOffsetSurface.TheonlychangeinthemenubaristheadditionofthesecommandsintheInsertmenuusingtwosubmenusbelowtheexistingones.182.2运行运行CATIA系统,并依次选择Start->Infrastru
4、cture->CAAV5:GeometricalCreation:ThiscreatesanewCAAGeometrydocumentwiththeCAAV5:GeometricalCreationworkbenchactive.2.3框架组成CAAAfrGeoCreationWkbWorkbenchdescriptionclassCAAAfrGeoCreationWkbFactoryFactoryclassfortheworkbenchclassCAAIAfrGeoCreationWkbFactoryFactoryinterfaceimplemente
5、dbyCAAAfrGeoCreationWkbFactoryTIE_CAAIAfrGeoCreationWkbFactoryTIEclassforthefactoryinterfaceCAAIAfrGeoCreationWkbAddinAdd-ininterfaceexposedbytheworkbenchandthatallitsadd-insmustimplementTIE_CAAIAfrGeoCreationWkbAddinTIEclassfortheadd-ininterface三、程序结构(Step-by-Step)3.1编程准备3.1.1确认
6、·MakesurethattheworkshoptowhichitisdedicatedexposestheCATIxxxConfigurationinterface,wherexxxistheworkshopidentifier,inaPublicInterfacesorProtectedInterfacesdirectory.·CreatethemoduledirectorytostoretheworkbenchcodealongwithitstwosubdirectoriesLocalInterfacesandsrc.Thenyouwillneed
7、tocreatethefollowingfiles.Intheframework'sProtectedInterfacesdirectory CAAIAfrGeoCreationWkbAddin.hTheheaderfileoftheworkbenchexposedinterfacetoenableclientstocreateadd-insIntheCAAAfrGeoCreationWbench.mLocalInterfacesdirectory CAAIAfrGeoCreationWkbFactory.hTheheaderfileofthework
8、benchfactoryinterface CAAAfrGeoCreationW
此文档下载收益归作者所有