Research and implementation of electronic drawing

2022-10-22
  • Detail

Research and implementation of electronic drawing information warehousing technology in PDM system

Introduction

since the 1990s, the majority of enterprises have benefited a lot from the promotion and application of computer aided design (CAD) technology, product design quality and design efficiency have been significantly improved, and enterprise benefits have increased significantly. At the same time, with the large number of CAD drawings, designers find it more and more difficult to find the required information from a large number of drawings. Statistics show that designers spend 70% of the time sorting out and searching for old data, and only 30% of the time is used for design. However, new products often need to inherit the achievements of old products up to more than 80%. The loading speed valve should be manually controlled to control the rising speed of the piston (the speed and safety valve are in one body). Designers often need to consult a large number of design drawings of old products, so how can we reduce sorting The time to find old product documents and improve the work efficiency of designers have become the problems to be solved by enterprises. In addition, for the needs of design, production and management, the product data management system PDM (Product Data Management) adopted by enterprises needs to provide bill of materials (BOM) in different forms and contents for different departments. For example, the production department needs a manufacturing BOM that only describes self-made parts; The purchasing department needs the purchase BOM of raw materials and standard parts; The financial department needs a financial BOM that reflects the cost accounting of parts and components; As the Department that needs to generate the most complete information, the design department should provide a BOM covering all the above information, and how these BOM information can be extracted from a large number of product related drawings and documents into related software systems such as PDM is also an urgent problem to be solved. Therefore, in consideration of the above two aspects, when developing our own product data management system, we proposed a scheme to extract the document description information from the most widely used AutoCAD graphic documents in most enterprises, so as to realize the document management and BOM information management of enterprises

1 principle of using ObjectARX to extract block attributes in DWG files

objectarx is an AutoCAD secondary development tool provided by Autodesk company. Its application program runs in the same address space as AutoCAD and can directly use AutoCAD core database structure and code. ObjectARX contains a set of dynamic link libraries (DLLs), which contain a set of general tools, so that secondary developers can directly access AutoCAD databases, graphics systems, etc

for each DWG file, AutoCAD maintains a database containing 9 symbol tables and data dictionaries in the background to store the information of all objects in the drawing file In other words, all contents contained in DWG files can be obtained by directly accessing the background database

in order to facilitate the archiving and unified management of engineering drawings, the title block and schedule within the enterprise are often drawn in a unified standard format. When drawing engineering drawings, in order to reduce workload and improve drawing efficiency, these title blocks and parts lists are often made into standard attribute blocks or standard templates, which are directly inserted into the drawings

based on the above phenomenon, this paper uses ObjectARX technology to access AutoCAD database, get block objects in paper space, and then obtain the attribute values of block objects. For the title block and parts list attribute blocks, their attribute values are the information we want to record into the product database

2 database access technology

at present, there are various technologies to access databases, but the most common are ODBC (open database connectivity), OLE DB (object link and embedded database) and ADO (ActiveX data object). The relationship between the three is shown in Figure 1. Because ODBC can only access relational databases, but not object databases and other non relational databases, its scope of use is limited; OLE DB is the underlying interface to access the database. Its function is very powerful, its use is relatively flexible, and its access speed is very fast, but its support for automation is not very good, and its access is relatively complex; ADO is located above OLE DB and is the user of OLE DB. ADO application program accesses OLE DB provider program through ADO, and the speed of accessing is naturally slower. However, ADO provides good support for automation, which makes it very convenient to access database and less memory expenditure

Figure 1 Diagram of three database access technologies

3 relationship between standard block attribute labels and fields in product database tables

different enterprises do not have the same field names in their product database tables when implementing PDM systems, and the field names correspond to standard block attribute labels, but the number of field names in product database tables is not exactly the same as block attribute labels. For example, the data in some product database tables need to save the access path information of the drawing, that is, there is a field name such as access path. Obviously, this information is not included in the title block attribute block, and we need to obtain it from other objects; The attribute block of the parts list contains three attribute labels: the number of parts, the weight of a single piece and the total weight. Obviously, the total weight is calculated by the number of parts and the weight of a single piece. Like the total weight, which can be inferred by other fields according to a certain algorithm, we don't need to save it in the product database. Because product data is the basis of implementing the whole PDM system, we should reduce redundant data as much as possible and remove some unnecessary constraints between data to facilitate data management and save storage space. If users really need related information such as total weight, we can feed back to users through views instead of storing it in the PDM database

in a word, the primary principle of the definition of standard block attribute labels is to make the drawing process as simple as possible, while the definition of data fields is to make the product database concise, easy to maintain and manage, and provide sufficient support for the implementation of the whole PDM system on the premise that the information of the anti hair viscosity energy band of word 6 can be obtained from the AutoCAD background database. See Table 1 for the corresponding relationship between block attribute labels and data field names

Table 1 the corresponding relationship between block attribute labels and data field names

4 the mapping between attribute blocks and data tables

the correct matching between different blocks and corresponding database tables is achieved by creating a blockreference in the database. The mapping table contains information such as attribute block name, data table name and data field name, which reflects the one-to-one correspondence between attribute block and data table. After defining attribute blocks and data tables, you need to add attribute block names, data table names, fields and other information to the mapping table in advance. In this way, when the attribute values of block attribute objects are extracted from paper space, first look up the mapping table according to the block name, find the corresponding data table, and then store the attribute values in the data table. See Table 2 for the mapping information between the detail table block and the data table in the mapping table. The keyname and keytype in the table represent the keyword name and keyword type of the bill of items table respectively; Fieldname describes the field name information in the bill of items table, separated by commas. Table 2 mapping information between detail table block and data table in the mapping table

5 data extraction and warehousing

data extraction and technical parameters of wood tensile and compressive strength testing machine: the process followed in warehousing is shown in Figure 2. First, open the drawing file containing attribute blocks in AutoCAD and run ObjectARX application. The application will automatically scan the drawing space and obtain all block objects; Then get the block name from the AutoCAD database and display it in the attribute block traversal dialog box shown in Figure 3, that is, all types of block objects in the current drawing space are listed in the attribute block name control, and a block name corresponds to a type of block object; Next, select the block type to extract the attribute value in the attribute block name list control. The application will automatically display all the custom attribute labels of the block object of this type in the attribute set list control according to the selected block name, and then click the traverse attribute value button. The application will automatically extract all the custom attribute values of the attribute block of this type and display the attribute values in the record table at the bottom of the dialog box; Finally, click Save to save the attribute values in the record table to the corresponding data table. In fact, in order to ensure the simplicity and effectiveness of data, data verification is required before saving to the database. The data verification mechanism before the implementation of the "plastic restriction order" depends on the specific requirements of enterprises for data. We know that the values of key fields in the database table are unique, that is, there cannot be two or more records with the same keyword values. Therefore, before saving the data to the database, we need to verify the keywords, that is, the records that already exist in the database cannot be saved repeatedly. If the same part is used in different products and assemblies, when saving the part information to the product database again, you only need to accumulate the number of parts

Figure 2 data extraction and warehousing process figure

6 conclusion

after the information of title block and parts list is stored in the data table corresponding to PDM database in the form of product data, the user can quickly retrieve the part drawing number, access path of drawing file and other information according to the part number, or fuzzy retrieval through pre-defined fields such as part material and part name, It is no longer necessary to manually find the required information from a large number of electronic drawings. Of course, the significance of implementing PDM system is far more than this, and document management is only one of the five basic functions of PDM system [2]. However, no matter how powerful the function of PDM system is, product data is always the cornerstone of implementing PDM system. If there is no data in PDM database, the implementation of PDM is impossible

References:

[1] Chen Xiaoling Discussion on the application of PDM [j] Coastal technology and enterprises, 2005,66 (6):

[2] Tong BINGSHU, Li Jianming Product data management (PDM) technology [m] Beijing: Tsinghua University Press, 2000

[3] Wang Fujun, Zhang Zhiming, Zhang Shiwei C/visual c++ application development tutorial in AutoCAD2000 environment [m] Beijing: Beijing Hope Electronic Publishing House, 2000

[4] Zhu Xuejun Research on ADO technology when developing AutoCAD with ARX [j] Journal of Chongqing Polytechnic College, 2004,2 (1): (end)

Copyright © 2011 JIN SHI