资源描述:
《ug opengrip语言总结简明经典教程(ug opengrip language summary concise classic tutorial)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ugopengrip语言总结简明经典教程(UGOpenGRIPlanguagesummaryconciseclassictutorial)UGOpen/Griplanguagesummaryconcisetutorial,Griplanguagewithcompletesyntaxrules,procedures,structures,internalfunctions,Gripproceduresmustbecompiled,connected,generatedexecutablefile,youcanrun.
2、GripprogramcanbeusedtoachieveavarietyofinteractiveoperationswithUG,suchasgeometrycreation,filemanagement,systemparametercontrol,accesstoUGdatabase,etc..ThisarticlesummeduptheGriplanguagesyntax,andannotatedexplanation.Suoyuannotes$$Gripstartandcompilation:first
3、findtheinstallationpathofUG,suchasC:ProgramFilesEDSUnigraphicsNX.Enterthepathofthe$$UGOPENdirectory,findgrade.batfile,openit,theenvironmentvariablebase_dirSetbase_dir=C:ProgramFilesEDSUnigraphicsissetto$$NX,saveandrun.SuoyuanGripprogramiswrittenandcompil
4、edinGripruntheprogram,type4,wherewillyouwriteGripprogram.Suoyuanrecordedwrittenandenter.IntheGrip'srunningprogram,type1,writethefilenameofthenewGripprogramandenter,atthistimeSuoyuanGripwillopenboard,inwhichyoucanwriteyourprogram.IntheGriprunprogram,type2andwri
5、teSuoyuanthecompiledfile,compilewithouterror,type3,writethelinkedfilename,rightafterthecompletionofthelink.Yousave$$Gripprogramintothe*.grsfile,theGripcompilerwillgenerate*.grifiles,GripwilllinkSuoyuangenerated*.grxfile,thisfiletorunthefileGrip.$$Gripprogram:o
6、penUG,clickFile->Execute->Grip,selectthe*.grxfile,youcanrunit.ThecompilershouldfirstcompilesubSuoyuanfunctionfile,generate*.grifiledoesnotneedtolinkfunctions,thencompilethemainfunctionTogeneratethe*.grifile,thelastlinkto$$,*.grx.Themainfunctionof$$Gripfilemust
7、endwithHALT,GripfunctionfilemustendwithRETURN.Suoyuandefinedvariablescannotexceed6characters,GripwouldthinkthatPoint_1andPoint_2arethesamevariables.Suoyuanlinemustnotexceed80characters,ifmorethan$symbolstowrapavailable.SuoyuanGripinsens,alsoknownasGripthinkPOI
8、NTandpointarepaintingpointfunction,butIsuggestGripSuoyuanfunctionnameandkeyworduppercase,lowercaseuserdefinedvariables.However,userdefinedvariablescannotbeassociatedwithGrip's.Suoy