首页 经典:Patran二次开发工具PCL系列教程之8

经典:Patran二次开发工具PCL系列教程之8

举报
开通vip

经典:Patran二次开发工具PCL系列教程之8Lecture8Customizing:Toolbar,p3printers.def,Keymapping,CreatinganAnalysisPreferenceDisplay-ToolbarTheToolbarprovidesquickaccesstofrequentlyusedfunctionsAdditionalfunctionsmaybeaddedtothetoolbar32ToolbarfunctionsaresuppliedwithMSC.PatranThedefaultUNIXtoolbarcont...

经典:Patran二次开发工具PCL系列教程之8
Lecture8Customizing:Toolbar,p3printers.def,Keymapping,CreatinganAnalysisPreferenceDisplay-ToolbarTheToolbarprovidesquickaccesstofrequentlyusedfunctionsAdditionalfunctionsmaybeaddedtothetoolbar32ToolbarfunctionsaresuppliedwithMSC.PatranThedefaultUNIXtoolbarcontains30iconsThedefaultNTtoolbarscontain32iconsPATRANDefaultToolbarIconsPATRANDefaultToolbarIcons(cont.)PATRANToolbarControlFileTheToolbaronthemainformisconfiguredbythep3toolbar.deffile.p3toolbar.defislocatedintheMSC.Patraninstallationdirectory.Thefileisreadinsequentialorderwhenthep3toolbarisdisplayed.i.e.,toptobottominthefilereferstotheiconslefttorightonthetoolbarp3toolbar.deffileexample:StartToolbar=Transform*ICON=tbrotatexy.bmp*CLASS=uil_toolbar*FUNCTION=rotate_xy*HELP=MouseRotateXY*LOADITEMEndToolbarPATRANToolbarControlFile(cont.)TheiconscanbefoundinPatran_install_dir/iconsdirectory.*CLASSindicateswheretofindthefunctionfortheicon.*FUNCTIONindicateswhichfunctionwillbeexecutedwhentheiconisselected.*HELPindicatesthehelpbubblethatwillbedisplayedwhenthemousemovesovertheicon.ThereisalsoanoptionforwhetherornottoloadtheiconintothetoolbarwhenPATRANisexecuted.InorderfortheicontoloadintoMSC.Patran,*LOADITEMmustbeaddedafterthe*HELPcall.TheStart/EndToolbarLines(NTonly)definetheboundariesofthedockabletoolbarsPATRANToolbarIcons*ICONspecifiestheiconthatistobeusedintheToolbarform.Theiconsarerestrictedtoa40x40bitmapformat(typically28x28forUNIXor16x16forNT).IconscanbecreatedusingvariousUNIXbitmaputilitiesorPaintforNT.Atoolbaricontemplate(UNIX)issuppliedwithMSC.Patranandcanbeusedtocreateuser-definedicons.tbblank.28.iconTheuserdefinediconsmustbereferencedinthep3toolbar.deffileandmustbeinMSC.Patran’spathp3toolbar.defmustbeineitherthePatran_install_dirortheusershomedirectoryPATRANToolbarFunctions*CLASSand*FUNCTIONspecifythefunctionthatistobeusedbytheIconintheToolbar.CLASSandFUNCTIONdefinitionscanbespecifiedbycreatingrelativelysimplePCLfunctions.PCLfunctionsthatresidewithinauserdefinedclassaremadeavailablebyreferencingthelibraryintheuser’sp3epilog.pclfile.!!PATHUNIX_path_to_library or sys_path(“ADD”,...)!!LIBRARYclass.plb or sys_path(“ADD”,...)p3printers.def(UNIXonly)Thep3printers.deffileislocatedinthePatran_install_dir.Thefileallowsyoutoconfiguretheprintersthatwillappearinthe“AvailablePrinters”listboxonthePrintform.TheprintersavailableonNTneedtobesetupthroughstarndardWindowsconfiguration.Anexampleoftheformatisshownbelow:$ThisistheDefaultPostscriptPrinterPrinter=PostscriptDefaultDevice=UnknownDriver=PostscriptDestination=UnknownPaperSize=Letter,Custom$SeethedocumentationforadditionalsizesWidth=0.0$DefaultwidthforCustompapersizeHeight=0.0$DefaultheightforCustompapersizeLeftMargin=0.5inRightMargin=0.5inTopMargin=0.5inBottomMargin=0.5inDefaultUnits=Inches,Points,cm$OtherunitsarePicasandmmPrintOrientation=Portrait,Landscape;Landscape$NoteuseofdefaultNumberofCopies=1p3printers.def(cont.)Thedriverisalsodisplayedinthep3printers.deffileAnexampleisshownbelow:$..........DriverSpecificOptions..................Format=BlacktoWhite,WhitetoBlack,Color$anotheroptionis“Grayscale”Background=White,Black,ActualLines&Text=White,Black,Actual;Black$NoteuseofdefaultLineWeight=0.5ptsTextScale=100%ImageSize=FitonPage,AsIsScaleFactor=NoShow;1.0$Noteuseof“NoShow”andadefaultCenter=NoShow;YesDrawBorders=Yes,NoQuality=NoShow;NormalColorModel=NoShow;RGBGCR=NoShow;75%Keymapping(UNIXonly)HotKeysTouchakeytoexecuteanoption,suchas:rotate,zoom,labelson/offFunctionsonthequickpick/toolbarcanbeexecutedfromthekeyboardProvidedbyX-lib(UNIXonly)Definedinafilecalled.Patran.EventMapsDefaultisinPatran_install_dir,andissearchedforthroughthePCLPathMostrecentkeymaphaspriorityIfthekeyisdefinedtwicethelastdefinitiontakesprecedence.Keymapping(cont.)KeymappingSyntaxModifier:FunctionModifiers:NoneMetaShiftCtrlAltLockEvent:Btn3DownBtn2DownBtn1DownBtn3UpBtn2UpBtn1UpKeyIfyouwanttospecifyacertainkeyKeynameKeyname=a,F1,KP_1Note:None:do_this(),makesanykeyyouhitexecutedo_this()KeymappingExample:Forexample,youmayhavethefollowingmappings:None1:LabelsOn()Shift1:LabelsOff()Alt:LabelsOn()Alt:LabelsOff()CtrlAlt:ZoomOut()CtrlAlt:ZoomIn()Ctrls:SpectrumOnOff()osfUp:PanUp()osfDown:PanDown()NoneKP_1:RearView()NoneKP_2:BottomView()Ctrl:PopupGMenu(*selectMenu)Ctrl:PopupGMenu(*appsPopMenu)Nonec:CallPCL(test_event)Wheretest_eventis:Functiontest_event()ui_exec_function(“my_class”,”display”)EndFunction/*test_event*/StepstoIncorporateyourownpreferenceintoMSC.PatranLoadthetemplatedatabasewithapplicationspecificattributes(PCL)AdduserinterfacefortheAnalysisform(PCL)Translatetheanalysismodel(PCL,Fortran,C)Readanalysisresultsintopatrandatabase(PCL,Fortran,C)StepstoIncorporateyourownpreferenceintoMSC.Patran(cont.)
本文档为【经典:Patran二次开发工具PCL系列教程之8】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
机构认证用户
夕夕资料
拥有专业强大的教研实力和完善的师资团队,专注为用户提供合同简历、论文写作、PPT设计、计划书、策划案、各类模板等,同时素材和资料部分来自网络,仅供参考.
格式:ppt
大小:177KB
软件:PowerPoint
页数:0
分类:
上传时间:2021-03-25
浏览量:21