The interface that is based on CATIA develops method and example 2 times

  • Time:
  • Click:146
  • source:YESCOM CNC Machining
Summary: The article introduced to apply VC++ 6 on the personal computer that is an operating system with Windows XP.

0 tools, be based on Component Application Architecture (CAA) the CATIA interface of package application framework develops a technology 2 times. Be based on CATIA2 through building on this foundation the motion of the machine tool of 5 coordinate numerical control of second development emulates a system, what example introduced 2 development of CATIA is current study a result. Keyword: 2 times motion of machine tool of development interface numerical control emulates CATIA CAA one, foreword CATIA (Computer Aided Three&Two Dimensional Interaction Application System, the computer is auxiliary and three-dimensional / 2 dimension are alternant type application system) V5 is IBM/DS the system of high-end CAD/CAM software that is based on Windows core development. The version with at present newest CATIA is V5R14. CATIA system has developed nowadays for compositive the CAD/CAE/CAM system that change, it has unified user interface, data management and compatible database and applied process interface, have the module of 20 many independence. In home, framework of application of component of CATIA application CAA undertakes 2 times developing just initial before long, opposite personnel is less, the material is not much, as a result of CATIA software function powerful and of function of CAA2 second development powerful, the 2 development technology that exploration and implementation are based on CATIA has very good application value. 2, the 2 development means of CATIA regards powerful project as software, CATIA has very strong open performance. The user can need according to his, use different kind to have the development on all sorts of degree. Interface of CATIA2 second development is to pass two kinds of means and exterior program communication: Process a plant uses a program (In-process Application) process of the application outside means and process (Out-Process Application) means. Process a plant falls with program kind, CATIA software and script move in space of same process address, for instance grand means (Macro) . Record through menu below CATIA environment grand (Record Macro) , after grand record, create VB scenario (Visual Basic Script) alignment, when grand begin to move, CATIA is in blame activation condition, accordingly cannot grand call between the value of memory variable, this kind of way is simpler, in CATIA environment medium achievable. Below kind of process of the application outside the process, CATIA and exterior application process move in space of different process address. Below the condition that runs in CATIA, exterior process can control through interface CATIA, found, the data of modification CATIA environment and geometrical body, dimension, support a boy or girl friend at the same time join and built-in (OLE, object Linking And Enbedding) . Specific for, 2 development of CATIA basically have two kinds of methods: Use grand undertake development and framework of use component application 2 times to CATIA (CAA – RADE) undertakes 2 times developing to CATIA. 1, use grand (Macro) undertake 2 times developing to CATIA. Can use at automation (Automation) package, use VBscript regards an editor as the tool, this is a kind of interactive mode is custom-built. Can record the unit process of cargo bandling of the user, generate code automatically. CATIA offerred Automation API to be used at 2 VBscript development to CATIA, automation API had as compatible as any OLE place platform to have communication capacity. Automation application interface can be called " InputBox " and " MsgBox " function gets an user input information and undertake outputting, and can apply Visual Basic to define more complex input to output face plate to NT user. Grand correlation can give an icon when moving, apposition shows frame into CATIA. If the development technological process of this kind of means pursues 1 in be shown. Graph the basic flow that 1 use VB has CATIA2 second development 2, use component applies a framework (CAA – RADE) undertakes to CATIA package applies a framework 2 times developing Component Application Architecture (CAA) , it is the strong tool that Dassault Systemes product expands and the client has 2 times developing. The CAA product that Dassault Systemes offers includes following content: CAA RADE develops an environment quickly, be based on Microsoft Visual Studio CAA CATIA V5 API, CAA ENOVIA LCA V5 API of tool of CATIA V5 application development, CAA DELMIA V5 API of tool of ENOVIA LCA application development, CAA ENOVIA PORTAL V5 API of tool of DELMIA V5 application development, tool of application development of ENOVIA PORTAL V5 applies Rapid Application Development Environment of environment of research and development quickly (RADE) it is a visible compositive development environment, it provides group of whole process designing tool. RADE with Microsoft Visual C++6.

0 for carrier, development tool is completely compositive was in in VC++ environment, and offerred program of frame of a CAA compile implement, but the partial function that also limitted VC++ at the same time. Can saying RADE of CATIA CAA – is current in environment of development of CAD/CAM of all high end most complex, also be a the function is most powerful at the same time. CAA uses object-oriented program language, the combination that developing a process to be able to be regarded is its component object and patulous. CAA introduces package object model (COM) the join with the object and built-in (OLE) technology, the framework of CAA is shown 2 times like the graph. Framework of graph 2 CAA 3, the example below 2 development method showed the CATIA interface of framework of use component application how to use CAA C++ to develop means to establish program of interior of a CATIA. The function of implementation is the workbench that builds an independence (Workbench) , come true below its add from definition menu, add toolbar and pushbutton icon, insert the dialog box of CATIA style. Give birth to those who become pair of interface functions to answer, build Command, implementation calls a dialog box, and build a three-dimensional model with code directly through inputting parameter, be in CATIA advocate show in the window. 1, the Workbench CATIA V5 that builds independence includes some kind a series of alternant jussive a few toolbars show in group in different workbench (Workbench) in, such is helpful for that search and use of the tool. The Workbench that builds through oneself can develop him 2 times a series of formation commands to show centrally in a workbench, facilitate the following operation. Of workbench build need the following measure. Establish workbench plant (Factory) interface (Interface) ; Establish workbench plant; Found workbench to describe kind; Found answer a command (Command) caption; Found workbench and arrange icon pushbutton to answer; The workbench that offers the resource such as picture and clew to will be built is inserted begin bill of fare; Found the indication interface of workbench. If the graph is shown 3 times,the CATIA after inserting newly-built workbench MyWorkBench begins bill of fare, the module with it and existing CATIA becomes paratactic concern. Enter MyWorkBench now pushbutton is reached without any toolbars inside workbench, this part tool is added below. Graph 3 generated new workbench 2, add toolbar and pushbutton to found pushbutton above all describe kind of CAAAfrGeoCreationWkb, derive at CATbaseUnknown kind. CATbaseUnknown is to found what user interface realizes an interface base kind, all interface accede from IUnknown / CATbaseUnknown. This kind in the CreateWorkbench() function that built two function to be CATCmdWorkbench * respectively and the CreateCommands() that do not have type of return of value. The function in front is to use implementation to insert icon of toolbar, pushbutton and menu orderly, the function from the back is implementation to inserting pushbutton and menu and the correlation that answer function. Used in CreateWorkbench() function grand NewAccess(className, variableName, objectName) . The yard of CATIA (Workshop) or workbench (Workbench) the gather package that can be regarded to be an entrance, use NewAccess grand can found a such entrance. Use SetAccessChild(variableName, childName) and SetAccessNext (variableName, nextName) these two grand can join the entrance. Among them ClassName expresses to be founded kind type, include the following kinds of types: CATCmdContainer, CATCmdWorkshop, CATCmdSeparator, CATCmdStarter. The container of a pushbutton was founded namely below, namely toolbar, and the partial code that amid adds pushbutton. NewAccess(CATCmdContainer, PCAAAfrTB1EltTlb, CAAAfrTB1EltTlb);// founds toolbar PCAAAfrTB1EltTlbSetAccessChild(pCAAAfrGeoCreationWkb, PCAAAfrTB1EltTlb); // toolbar joins workbench / / found pushbutton Cmd1, install its to answer grand for CAAAfrCmd1Hdr, join its the NewAccess(CATCmdStarter in toolbar TB1 finally, PCAAAfrTTB1EltCmd1Str, CAAAfrTTB1EltCmd1Str);SetAccessCommand(pCAAAfrTTB1EltCmd1Str, "CAAAfrCmd1Hdr");SetAccessChild(pCAAAfrTB1EltTlb, PCAAAfrTTB1EltCmd1Str); next scale an icon, be in CAAAfrGeoCreationWkbHeader.

CATRsc lieutenant general its are associated, specific as follows, criterion what Cmd1 pushbutton shows is CAACmd1.

Bmp icon. CAAAfrGeoCreationWkbHeader.

CAAAfrCmd1Hdr.

Icon.

Normal = "I_CAACmd1"; is in CAAAfrGeoCreationWkbHeader.

The setting in CATNls file builds the caption of pushbutton and clew content CAAAfrGeoCreationWkbHeader.

CAAAfrCmd1Hdr.

Category = "Element";CAAAfrGeoCreationWkbHeader.

CAAAfrCmd1Hdr.

Title = "command1";CAAAfrGeoCreationWkbHeader.

CAAAfrCmd1Hdr.

The result that ShortHelp = "new Cmd1"; adds two toolbars and thrusts a series of button pursues as follows face figure is shown 4 times. Graph 4 new additive pushbutton pursues 5 additive bill of fare 3, the accretion that adds menu bill of fare and add pushbutton similar, also be to be in CreateWorkbench() function, just be to be in grand medium parameter and add pushbutton and different. If the graph shows NewAccess(CATCmdContainer 5 times,the effect after adding pursues, PCAAAfrGeoCreationMbr, CAAAfrGeoCreationMbr);NewAccess(CATCmdContainer, PCATAfrInsertMnu, CATAfrInsertMnu);SetAccessChild(pCAAAfrGeoCreationMbr, PCATAfrInsertMnu);NewAccess(CATCmdSeparator, PCAAAfrGeoCreationInsertSep, CAAAfrGeoCreationInsertSep);SetAccessChild(pCATAfrInsertMnu, PCAAAfrGeoCreationInsertSep);NewAccess(CATCmdContainer, PCAAAfrMeu1EltSnu, CAAAfrMeu1EltSnu);SetAccessNext(pCAAAfrGeoCreationInsertSep, PCAAAfrMeu1EltSnu);NewAccess(CATCmdStarter, PCAAAfrMMeu1SubMn1Str, CAAAfrMMeu1SubMn1Str);SetAccessChild(pCAAAfrMeu1EltSnu, PCAAAfrMMeu1SubMn1Str);SetAccessCommand(pCAAAfrMMeu1SubMn1Str, "CAAAfrCmd1Hdr"); is in CAAAfrGeoCreationWkb.

The attribute that menu shows is installed in CATNls file. CAAAfr Meu1EltSnu.

Title = " builds menu 1" ;CAAAfr Meu1EltTlb.

The Title = "command1" ; 3, response that builds menu and pushbutton kind the Workbench sky that has built can found 3 sort in frame model answer (Command) kind, CATCommand derive comes out them. Specific adding a process is to open "Insert" of CAA Rade menu, choose the "Command below "CATIA Resource" .

.

.

". Can choose Statechart Command, dialog-box Based Command and Basic Command. Basic Command is the response that founds a sky kind, in function Activate(CATCommand * IFromClient, add in CATNotification * IEvtDat) answer. Dialog-box Based Command is met in be developed 2 times by more using go to. Choose this type to answer kind, can play directly when move give a dialog box, of course, can have an edition to this dialog box. If the graph is shown 6 times,the dialog box edits an interface, there is to be in inside editorial dialog box, in the graph mid, right is take oneself a few accuse, include CATDlgframe, CATDlgLabel, CATDlgEditor, CATDlgPushButton, CATDlgRadioButton is waited a moment. Inside the dialog box all accusing in Build () list in function, applied function SetGridConstraints (Short Int ITopRow, short Int ILeftColumn, short Int IRowSpan, unsigned Int IJustification) accuse a means in position of the matrix in the dialog box to adjust the position through the setting. To accuse add callback function to answer all sorts of operations. If the graph is shown 7 times, CATDlgPushButton pushbutton accuses include Creation, visibility Swap, resizement, function of the callback in Button Activation and Repetitive Button Activation5. Generation of choice Button Activation is clicked answer generate callback function OnPushButton004PushBActivateNotification(CATCommand* Cmd, CATNotification* Evt, CATCommandClientData Data) , code can be added inside this function. Graph 6 dialog boxes compile a figure 7 add a dialog box to control a callback function 4, development example 1, through inputting the example of style of parameter scale drawing, can build drawing style and other and complex model according to his need, realize the course that parameter changes, this passes length of the radius that inputs sectional circle, drawing and drawing direction and sectional law in the exemple to angle the value makes drawing system, can change its position. If pursue,8 are shown. Graph 8 pushbutton dialog box answers scale drawing style 2, motion of machine tool of 5 coordinate numerical control is emulated. The digitlization that realized a machine tool builds the motion of model and machine tool to emulate, can realize more emulation functions and module on this foundation. Emulate the effect after finishing to if the graph is shown 9 times,pursue, graph 10 with the graph the 11 indication that are local effect and knife course respectively. Above all, build an independent workbench, two each module build below: Machine tool model builds module and motion to emulate module. The Toolbar that builds respective place to need for every module and dialog box and answer function, the method that can mention before reference. Next, apply code to generate a machine tool to digitlize a model through using the function building a model of CATIA itself to perhaps use him development 2 times. The article used latter, the face to the model operation after such is helpful for and add the tie parameter such as machine tool journey. Built a model to apply the product structure module of CATIA, machine tool file is * .

CATProduct. The Part Design part that uses CAA C++ above all builds a machine tool the spare parts of departmental cent, every part is independent * .

CATPart file. The component of 3D PLM PPR that uses CAA C++ next realizes the assembly of whole machine tool. The athletic copy that is a machine tool next comes true really. After mobile direction and coordinate cost are being recovered after reading file extraction NC to pass processing. The root product that uses CATIDocRoots interface to find machine tool model (Root Product) , all over all previous to get wanting part of mobile corresponding machine tool, get CATIMovable interface realizes the shift of relevant section, mobile matrix is CATMathTransformation type. Generate and show finally is cutting tool contrail, here used the GSM of CAA and Shape Design&Styling. Can show linear, circular arc and batten curve. Graph the integral effect graph that motion of 9 machine tools emulates pursues 10 motion emulate local effect graph to pursue the movement of slideway machine tool that 11 independence show is emulated explored applied CAA to realize an interface 2 times development, substance and dimensional curve build model, product to assemble reach the side such as athletic effect. Not only can realize fictitious treatment to emulate, OK also in applying fictitious constructional animation shows a side. Because CATIA CAA develops the application of adoption package means and COM 2 times, be changed plus the administrative levels of CATIA itself structure and rigorous, also have greater difficulty to be being compared with photograph of other CAD software so. 5, component of CAA of last word application undertakes 2 times developing to CATIA software, can shorten greatly the development cycle of special system. Component Application Architecture (CAA) package application framework, it is tripartite product compositive undertake with average client the client is changed, the strong tool that individuation designs, the depth that uses CAA to be able to realize Dassault Systemes application completely second development. But, because Dassault Systemes applies the complexity of itself and the depth that CAA involves second content, be changed plus the administrative levels of CATIA itself structure and rigorous, use CAA to have the complexity with CATIA2 second development and older than also be being had photograph of other CAD software and difficulty so, but also can realize more powerful function at the same time. CNC Milling CNC Machining