The use of new skills in the new modality for the use and development of the gear quasi-component construction library


Introduction of 1Pro/E and secondary development tools Features of 1.1Pro/E system The most typical feature of Pro/E system is parameterization. Parameterization is mainly reflected in not only controlling the model with dimensional parameters, but also establishing mathematical relationships between dimensions. , so that it always maintains relative size, position and other constraints. In part mode, the system allows the creation of relationships between features that cause different features in the part to be correlated. The parameter relationships created at this point become part relationships, and in the part and assembly mode, the system also allows for array features. Or establish a parameter relationship between array elements.
Relationship between 1.2Pro/E, MFC and ODBC The interface between Pro/E and MFC is the custom toolkit Pro/Toolkit provided by PTC for Pro/E software. This toolbox provides the user program or software third-party program. Seamless connection of Pro/E. User programs or third-party programs are written in C language. Pro/Toolkit provides a C library that enables users or third-party applications to access Pro/E databases in a controlled and secure manner. So Pro/Toolkit is the API for Pro/E application developers. Pro/Toolkit is written in a powerful object-oriented approach. The two basic concepts are objects and behaviors. The data structure that conveys information between Pro/E and the application is invisible to the application and can only be accessed through functions in the Pro/Toolkit. With the Pro/Toolkit toolbox, you can extend the functionality of the original software by calling its own functions, and the gear standard parts library can be realized.
Use the Access2002 relational database to establish the gear standard library CLBZK, and then use ODBC to do the programming interface, which can access the external database conveniently and efficiently.
ODBC is a programming interface based on Structured Query Language (SQL). The MFC Foundation Class Library of VC 6.0 defines CRecordset, which encapsulates many functions for performing operations on table records, such as querying, adding, deleting, and modifying records. And can directly map a CRecordset class object to the table in the data source, which is convenient for users to interact with the database.
The Pro/E and MFC applications are communicated by dynamic link library (DLL) and ODBC, and the interface implementation scheme of the system is proposed.
2 Using the Visual C 6.0 Wizard to create the gear parameter design application 2.1 The main content of the program design is: (1) write the (.txt) file of the drop-down menu and the (.res) resource file of the dialog box; (2) press Pro/Toolkit The requirements of the application running in the Pro/E environment design interface and the termination program at the end of the application run; (3) design the main part of the Pro/Toolkit application according to the functional requirements.
2.2 The main structure of the program part intuserinitialize(intargc, char3argv[]), whose function is equivalent to the main() function in C language.
{uiCmdCmdIdcmdid1; ∥ define the button ID variable ProCmdActionAdd ("cmdid1"
, CLBZK(),); ∥ set button command ProMenubarMenuAdd("UserMenu"
, "GB gear standard parts library"
, "Utilities"
, PROBFALSE, UserMsg); ProMenubarmPushbuttonenuAdd("UserMenu"
, "Standard spur gears"
, "Standard spur gear help"
, "Utilities"
, PROBFALSE, cmdid1, UserMsg); ∥ add button command ------return(0);}voiduserterminate(){return;∥This part is the function used to end the Pro/Toolkit application}CLBZK(); ∥This part mainly adds one or more C language codes to complete the scheduled function. After editing the source code, compile with Visual C 6.0. First, set the build environment, then integrate the Pro/Toolk2it application into Pro/E. In the system, the application must be registered in order to run and generate a registration file (3.dat), which contains the location of the Pro/E application, the location of the menu resources and dialog resource files, and the Pro/Toolkit Version information, etc.
3 System structure and gear standard library development 3.1 System structure diagram Gear standard library CLBZK development is based on Pro/E internal secondary development language Pro/Toolkit, first by calling its internal function, added with Pro/E The menu of the file menu is side by side, and then call the VC 6.0 user interface to perform related operations on CLBZK. The standard parts library can be operated in time according to the specific situation, thus satisfying the needs of different designers. Finally, you can convert 3D solid maps into engineering drawings.
System structure see 2.
3.2 Key steps for the establishment of the gear standard library First, use Pro/E's powerful parameterization function to build a gear parts library, and at the same time find out the relationship between all the dimensions of the gear parts, determine the parameters that can be used to drive the generated model, and then the dimensional relationship. Input to Pro/E Programe, then use Pro/E Pro/Toolkit technology to design the user to call the interface of the standard parts library, write the parameterized driver, so that the call to CLBZK can be realized.
Secondly, using the Pro/Toolkit technology of Pro/E, the drop-down menu is compiled on the Vi2sualC 6.0 platform. The source files compiled in this include menu resource files and program source files.
Finally, using Visual C 6.0 dialog technology, the interface of human-computer interaction dialog is compiled, and the Access2002 database is used to establish the gear standard library CLBZK.
4 Development example Taking the created GB gear standard library CLBZK as an example, the application of this secondary development system is introduced. Start Pro/E first, then run the registration file (CLBZK.dat), run the Pro/E menu, see 4. Then select the next menu, for example, select the standard helical gear menu, pop up the VC interface, and move the gear At the same time of secondary design, you can also add, delete and other operations on the database, see 5.
5 Conclusions For the design of special gears in some industries, or the design of other non-standard gears, only a few parameters can be input, and the required parts can be generated by parameter driving, which greatly improves the design efficiency. At the same time, the secondary development technology of Pro/E has been systematically studied, which is helpful for reference to the colleagues of secondary development of Pro/E.

CNC Machining

Cnc Service,Metal Fabrication Service,Metal Laser Cutting Service,Cnc Machining Parts

Shenzhen Bergek Technology Co.,LTD , https://www.szbergek.com