The research and development of CAPP provides an effective auxiliary tool for process design and is the key to linking the design process and manufacturing process. In the process design, the process card is the basis for guiding the workers to complete the site: different companies have different types of process cards, and they are different; at the same time, with the development of the enterprise, product types, and technological level, the process card The format is still changing. The traditional CAPP interaction technology can no longer meet the requirements of this format conversion. Therefore, the process card format suitable for the enterprise is developed, and these file formats can be easily and flexibly modified along with the development of the enterprise, becoming a CAPP system. A very important function is also an important part of the study of the CAPP system.

Aiming at the above problems, this paper proposes a template customization technology based on XML, which allows the craftman to draw the corresponding craft card according to the format he needs, and can adjust and modify the generated craft template to provide the same type of craft file. The consistent interactive platform also lays an important foundation for realizing the versatility and practicality of the CAPP system.

1 template composition object analysis

Since the process card is the main object of the work of the craftsman, the CAPP system must be able to realize the computer description of the process card, which is the so-called "process document template".

The template is an abstraction of the format of the process file. Therefore, a deep analysis of the process file must be performed before the component of the template can be determined. Although the CAPP process card types are numerous, it can be seen from the analysis of the process card that the card is composed of a series of cells. Cells can be divided into four types: fixed grid, variable grid, object grid, and loop grid. A cell containing a fixed content such as a unit name is defined as a fixed cell; it contains the product name, product ID, part name, part number, etc. The cell that changes with the product or part is defined as a variable cell; Cells of other complex data are defined as object grids; cells containing multiple rows of records such as operations and work steps are defined as circular cells. The content of the fixed grid is determined during the design of the card, and the contents of the variable grid, the object grid, and the cycle grid are filled in by the user during the process design. The user can define each cell when designing a card.

Taking the forging process card as an example, as shown in FIG. 1, the element decomposition of the process document template is explained.


Figure 1 Elemental decomposition of a process document template

Since each craft card can be regarded as a collection of box-type cells, it is abstracted according to the principle of regional division and management. A card can be divided into five areas: header area, table area, and version area. , School District and Annex Area.

(1) The area in the table is filled with multiple rows of data in the card, such as the Department of Operations; (2) the version area includes the version, revision number, number and modification column, etc.; (3) The compilation area includes preparation, proofreading, and review , review, etc.; (4) The attachment area is a cell that needs to be inserted into the picture, such as the process schematic part and the heat treatment specification part; (5) cells that do not belong to the above four areas are categorized as heading areas and usually include products. Name, product work number, part name, part number, etc.

After such an abstraction, in the CAPP system, there is no true craft card, nor is any generated craft card stored on the disk in the form of a file, and all data is stored in the background. The database includes a process library, a resource library, a report template library, and various other shared databases. Combined with certain coding rules, one-by-one process cards are associated with their required product data and process data, thereby forming a "virtual process card" and storing it in a virtual art bank. When it is necessary to display or output a process card, the system automatically activates all the link relationships and fills the data in the corresponding fields of the report template to display or print out the actual process document.

The concept of "virtual technology card" fully embodies the superiority of database technology. The various data in the back-end database are both interrelated and independent. When the format of a card changes, the system will automatically update all the virtual process files associated with the template. This change will only affect a certain two-dimensional table in the database without affecting any other data. At the same time, the "virtual process card" greatly saves hard disk space, and there is no problem of conversion between old and new craft cards, and avoids a great deal of duplication of effort.

2 Template data description

XML uses documents to represent entities, and elements in documents represent instances of entities. Each tag in the document is the beginning of a new element. An XML element contains a start tag, an end tag, and the contents of the element. Based on the information decomposition of the process template, it can be seen that the process document template can be seen as an entity, and the various elements of the template can be seen as a series of instances of the entity. Therefore, a set of generic XML describing the process card table can be designed using XML technology. Glossary, based on this, users can flexibly build the required process file template based on this set of vocabularies and DTDs. After the constructed process template (XML document) is parsed by the table generation engine, it is displayed in the client browser.

The cell that describes the content area of ​​the card for the metadata of the process sheet metadata can be represented by a <Table> element. Row and col respectively represent the number of rows and columns, x1, y1 represent the coordinates of the upper left corner of the box, and x2, y2 indicate The coordinates of the bottom right corner of the square, type indicates the layout of the grid. The <Rcet> element defines the column header. The attribute name indicates the field name, and the element defines a line of text in the fixed grid. font, size, and mid respectively indicate the font, size, and position of the text. The cycle grid shown in Figure 2 has 3 rows and 3 columns, the coordinates in the upper left corner are (240, 61), and the coordinates in the lower right corner are (282, 82).






Due to the variety of types of process cards, when developing a CAPP system, it is required to establish the relationship between process cards to facilitate the retrieval and integration with other systems. Therefore, it is necessary to uniformly define the data dictionary of the process template and use this as a basis for data association.

3 XML-based template customization technology

According to template component analysis, template customization is actually a process of decomposing a type of process card format into fixed sub-elements such as a fixed grid, a variable grid, an object grid, and a loop grid, and a separate process is generated by means of interactive means. It is necessary to analyze the generation patterns and attribute definitions of each sub-element.

3.1 Template Sub-element Generation Mode Analysis

Since the template is viewed as an XML document entity, the process of generating a template is actually the process of creating a new XML document. The new template child element corresponds to a node that creates an XML document.

To create a new document object, you must create a new Msxml2.DOMDocument sample. The corresponding C++ code is as follows:


After creating the DOMDocument object, you can set tags for different types of parsing and processing behavior, load XML documents, and create new nodes inside the document to create different template child elements.

3.2 Definition of Object Properties

In order to customize the position of each child element in the process template and other necessary information, it is necessary to assign corresponding attributes to each child element object. The attribute manipulation methods provided by XML come from IXMLDOMElement and can be set by IXMLDOMEIement's setAttribute method. The object's attribute analysis is as follows:

(1) Common attributes of each object. Because each child element is a series of cells, it contains common attributes such as table coordinates and line shapes. In addition, you need to set the card area properties for each cell.
(2) Fixed grid. The content of the fixed grid has been determined at the time of table design. In order to achieve the association with the database, the field name attribute needs to be set. In addition, it needs to include a "font" sub-element to set the attribute of the text.
(3) Variable grid. The content of the variable grid is filled in by the user. The layout of the table needs to be set. It contains fixed grid elements.
(4) Cycle grid. Loop cells also contain fixed grid elements. In addition, because it contains multiple rows of records, in addition to setting the layout of the table, you need to set the row and column properties.
(5) Object grid. The object grid is a cell that fills in the process map or other complex data and needs to set the source attribute of the graph or other complex data.

After the template objects are generated, the template customization work is basically completed. The constructed process template is stored as an XML document. When the template is opened again, as long as the corresponding XML document is parsed, the original craft card can be displayed on the client browser.

3.3 Interactive modification of template format

After the template objects are generated, sometimes the format cannot meet the requirements, and a series of adjustments need to be made to finally form a well-formed process template. This modification includes changes to table locations, table lines, field names, fixed text content attributes, and the like.

When the table is modified, as long as a cell is selected, the corresponding table property setting dialog box will pop up, and the user can modify its properties (as shown in FIG. 3).


After the user clicks "Modify", the changes made will be saved in the corresponding XML document, and the interface will be refreshed immediately and displayed as the modified template content.

4 Conclusion

Through the analysis of the process card, the process template is abstracted as an entity composed of a fixed grid, a variable grid, an object grid, and a loop grid, and its sub-elements are respectively generated through interactive means, and the constructed process template is saved as an XML document. This completes the template customization process. Practice has proved that this interactive template customization technology is of great significance to the versatility and commercialization of the CAPP system.

Bungee Cord

Bungee Cord Assortment set secures your items quickly and easily. Providing up to 40 in. in length, this set is perfect for securing items indoors or outdoors. Durable construction provides weather resistance for long-lasting use. Get the security you need with reliable strength you can trust. Assorted pack includes 24 pieces and includes a handy reusable, resealable jar for easy storage.

Bungee Cord,Bungee Cord Set,Rubber Elastic Bungee Cords,Heavy Duty Tents Bungee Cord

WINNERLIFTING SAFETY EQUIPMENT CO., LTD. , https://www.winnerstrap.com

Posted on