Application of Database Technology in Packaging Container CAD (Part 2)
2.2 Application of Packaging Database
In order to facilitate database management and application program access to database information, in the VC++ environment, DAO is used as the programming interface for application programs to access the database. In the packaging container CAD system, the main parameters of the packaging container and other parameters for selecting the national standard are established through Access in the form of MDB. In order to improve the use of software efficiency and operability. The packaging CAD system must have friendly human-computer interaction capabilities. For some areas where human intervention is required, the program should be able to prompt the user and allow the designer to design for human intervention. At the same time, the interface between application software should also be considered. DAO technology completely solves the problem of human-computer interaction and database interface. The user selects the packaging container series, type and corresponding model through the main interface list box, and then inquiries the corresponding main parameters through the parameter table. Depending on the user's choice of the model's main parameters (such as length and volume) and other corresponding parameters, they are optimized and the final parameters are output to the corresponding parts of the parameter design page of the parameter interface (see Figure 2).
CAODatabase, CdaoDataReord-View, CdaoReeordaset related to DAO in MFC. CdaoDatabase provides a connection interface with the database, through which users can achieve the operation of the database. After the user selects the packaging container type through the main interface, the corresponding fields in the main parameter table are associated with the member variables of the CdaoRecordaset derived class through RFX. The CdaoRecordaset derived class member CdaoDataReordView class establishes associations via DDX, and CdaoDataReordView displays records in the database through controls, thereby establishing a connection between the main dialog and the database. The auxiliary parameters of the packaging container are selected according to the selected main parameters to the corresponding database table. The development process of the DAO program in MFC is as follows:
In the packaging container CAD system, the information exists in the form of data. Any operations performed on the system involve operations such as querying, modifying, and deleting data.
3 Parameterized rapid design of packaging containers
See circle 3, Combining Database Development Standard Packaging Container Parametric 2D, 3
Source: Packaging Engineering Chen Shaowei Xu Dahua Yang Tao Tianjin Business School