A method for generating an engineering drawing specification table based on CATIA secondary development
By using the CATIA secondary development tool CAA-RADE, multi-column detail tables are automatically created, solving the problem of low generation efficiency in existing technologies. This enables automatic matching and segmentation of detail tables and drawings, improving the standardization and workflow of engineering drawings.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUBEI UNIV OF AUTOMOTIVE TECH
- Filing Date
- 2022-11-07
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies cannot meet national standards and enterprise requirements when using CATIA to generate parts lists, and manual segmentation and positioning are required when there are many sub-components in the assembly, which is inefficient.
The CAA-RADE tool, a secondary development tool for CATIA, enables the automatic creation of multi-column parts lists, including data acquisition from engineering drawing documents, statistics of assembly sub-component lists, calculation and filling of parts list data, automatic identification and removal of wireframe or surface models, and location and filling of parts list content.
It improves the efficiency of creating schedules, reduces the error rate of manual operations, realizes automatic matching and multi-column splitting of schedules and drawings, and enhances the standardization and streamlining of engineering drawings.
Smart Images

Figure CN116305344B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of application software development and engineering drawing, and more specifically, to a method for generating engineering drawing detail tables based on CATIA secondary development. Background Technology
[0002] When creating engineering drawings for an assembly, the bill of materials (BOM) is a detailed catalog containing information on all parts of the assembly. It consists of part numbers, names, quantities, materials, specifications, and heat treatment methods for each sub-part. It is crucial in the design, manufacturing, and assembly processes of a product. CATIA, a CAD / CAE / CAM integrated software from Dassault Systems, is widely used in manufacturing industries such as automotive, shipbuilding, and aerospace. CATIA's engineering drawing module can create views, dimensions, tolerances, and text annotations. It also provides functionality for creating bills of materials; however, the BOMs generated during use often fail to meet national standards and enterprise requirements.
[0003] There are currently three main methods for creating part lists: The first is to create a template file for the part list, then select and import the template file, add or delete tables, manually input text, and modify attributes to create the assembly's part list. The second is to create a text file (.csv) in Excel, manually fill in the attributes of the assembly sub-components, and then use CATIA's "Create Table from CSV" function to create the part list. Then, adjust the row height, column width, and text attributes as needed. There is no link between the content in the part list and the attributes of the assembly components. The third is to create the part list through CATIA secondary development. Currently, this method mostly generates only one column of part list. When the number of sub-components in the assembly is too large, it is necessary to manually split the part list and reposition it to the appropriate location. This creation method is currently not intelligent enough.
[0004] This invention utilizes the CATIA secondary development tool CAA-RADE to perform secondary development on CATIA, proposing a method for rapid creation of parts lists. This method enables the creation of multi-column parts lists and solves the problem of skeleton models not being included in parts lists in top-down design. This invention improves the efficiency of parts list creation, allowing designers to focus on design, and also enhances the standardization, streamlining, and automation of the engineering drawing output process. Summary of the Invention
[0005] The present invention aims to provide a method for quickly creating an assembly parts list to solve the problem of low efficiency in traditional manual creation.
[0006] The objective of this invention is achieved through the following technical solution:
[0007] A method for generating engineering drawing detail tables based on CATIA secondary development includes the following steps:
[0008] S1. Obtaining engineering drawing document data and determining the status of the detailed table;
[0009] S2. Obtaining and compiling the list of assembly sub-components;
[0010] S3. Calculation of each data item in the detailed list;
[0011] S4. Creating the details table;
[0012] S5. Filling out the detailed list.
[0013] Preferably, the engineering drawing document data obtained in step S1 includes: the drawing sheet information of the currently active page (Sheet) of the engineering drawing, as well as the operation handles of the background view and working view of the active page, and the active view (such as the front view or side view) in the working view.
[0014] Preferably, in step S1, the status of the detail table is judged to ensure that the detail table is not created repeatedly. By performing feature search on the detail table in the obtained background view container, if the detail table is found to exist, a prompt will be made that the detail table already exists.
[0015] Preferably, the list of assembly sub-parts obtained in step S2 comes from the 3D model document linked to the active view in the working view, and the bill of materials is only used for assemblies. When it is detected that the type of the obtained 3D model document is not "*.CATProduct", an error message will be displayed indicating that the bill of materials was created.
[0016] Preferably, the statistical organization of the assembly sub-component list in step S2 includes the removal of duplicate elements and the counting of element counts. This is achieved by obtaining the part number of each sub-component element and adding it to a string list, then using two loops to determine whether the part numbers are the same, thereby removing duplicate sub-components from the list and incrementing the count of each removed element by 1.
[0017] Preferably, the statistical organization of the assembly sub-component list in step S2 includes identifying whether the sub-levels in the sub-component element list are wireframe or surface models, which is determined by obtaining the volume of the sub-component element. If the volume is 0, the element is removed from the list.
[0018] Preferably, the calculation of each data item in step S3 of the detail table includes calculating the number of rows in each column of the detail table. When there is only one column of detail table, the number of rows is Q+1. When there are two or more columns of detail table, the number of rows in the first column of detail table needs to be calculated as N. f The number of rows in the intermediate column details table is N.m and the number of rows N in the last column of the details table l The calculation formula is:
[0019] (1)
[0020] Where: V is the vertical height of the drawing, a is the offset distance of the drawing, b is the height of the drawing title block, h is the row height of the bill of materials, Q is the number of elements in the final assembly sub-parts list, and S is the number of columns in the actual bill of materials.
[0021] Preferably, the calculation of each data item in the schedule in step S3 includes calculating the actual demand S of the schedule and the maximum number of drawing pages S. max The calculation formula is:
[0022] (2)
[0023] Where: H is the horizontal length of the drawing, l is the binding width of the drawing, B is the width of the bill of materials, and ceil is the round-up function.
[0024] Preferably, the calculation of each data item in the detailed list in step S3 includes determining whether the current drawing page can accommodate the current number of assembly sub-components. This is done by comparing the final number of assembly sub-components in the list with the maximum number that the drawing page can accommodate. If it cannot, the user will be prompted to change to a larger drawing size. The maximum number of assembly sub-components N that the current page can accommodate is... max The calculation formula is:
[0025] (3)
[0026] Preferably, in step S4, when creating the detail table, the bottom of the detail table is used as the positioning point. Specifically, the positioning methods include three types: bottom left, bottom center, and bottom right. The coordinates of the positioning point differ depending on the positioning method. The formula for calculating the horizontal coordinate X of the detail table is:
[0027] (4)
[0028] Where H is the horizontal length of the drawing, a is the distance of the drawing border, B is the width of the bill of materials, j is the number of columns in the bill of materials, and C is the coordinate calculation dynamic parameter;
[0029] Preferably, step S4 provides customization of the detail table style when creating the detail table. The customization includes: the table header content, cell layout, row height, column width and positioning method, text font, font height, alignment, and product attributes to be extracted.
[0030] Preferably, when the detail table created in step S4 has only one column, a detail table with Q+1 rows is created; when there are multiple columns, a loop is used to create the detail table, first creating the first column with N rows. f If the second column of the detail table is not the last column of the detail table, then the number of rows created in the loop is N. m The detailed table continues until the last column with N rows is created. l The details table is then looped through to retrieve the attributes of each sublist element.
[0031] Preferably, in step S5, when filling in the detail table, the text used to fill in the detail table comes from the attributes of the assembly sub-components. The attributes of the assembly sub-components are obtained through a loop, and then the attributes of the text in the detail table are modified through another loop.
[0032] Preferably, when filling in the details table in step S5, the assembly sub-components are numbered from top to bottom according to the order on the assembly structure tree.
[0033] Preferably, in step S5, when filling in the parts list, the assembly sub-components need to be obtained from different positions depending on the location of the parts list. The range of elements in the sub-component list obtained from the first column of the parts list is as follows: The range of elements in the sub-item list obtained from the j-th column of the details table is... The range of elements in the sub-item list obtained from the last column of the details table is... .
[0034] The present invention has the following beneficial effects:
[0035] Compared to existing technologies, this invention enables one-click creation of bill of materials (BOMs), can identify wireframe or surface models in assembly sub-components and remove them from the BOM, and the created BOM can match the current drawing size. It can automatically divide the table to create multi-column BOMs based on the drawing size information, achieve the unification of assembly attribute information and BOM text, improve the generation efficiency of assembly BOMs, reduce the error rate in the manual creation process, and simplify the drawing output process. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings corresponding to the embodiments are briefly described below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a main flowchart of a method for generating an engineering drawing detail table based on CATIA secondary development in an embodiment of the present invention.
[0038] Figure 2This is a flowchart illustrating the process of obtaining engineering drawing document data and determining the status of the detail table, as described in an embodiment of the present invention, for a method of generating an engineering drawing detail table based on CATIA secondary development.
[0039] Figure 3 This is a flowchart illustrating the process of obtaining and statistically organizing the assembly sub-component list in a method for generating an engineering drawing detail table based on CATIA secondary development, as described in an embodiment of the present invention.
[0040] Figure 4 This is a flowchart illustrating the calculation process of various data in the detail table of an engineering drawing detail table generation method based on CATIA secondary development, as described in an embodiment of the present invention.
[0041] Figure 5 This is a flowchart illustrating the creation of a detail table in a method for generating an engineering drawing detail table based on CATIA secondary development, as described in an embodiment of the present invention.
[0042] Figure 6 This is a flowchart illustrating the process of filling in the detail table in a method for generating an engineering drawing detail table based on CATIA secondary development, as described in an embodiment of the present invention.
[0043] Figure 7 This is a product attribute page for an assembly sub-component in a method for generating an engineering drawing detail table based on CATIA secondary development, as described in an embodiment of the present invention.
[0044] Figure 8 A detailed list created using this invention. Detailed Implementation
[0045] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the invention.
[0046] Example 1
[0047] This invention provides a method for generating an engineering drawing detail table based on CATIA secondary development, as shown in the attached figure. Figure 1 The steps shown are as follows:
[0048] S1. Obtaining engineering drawing document data and determining the status of the detailed table;
[0049] S2. Obtaining and compiling the list of assembly sub-components;
[0050] S3. Calculation of each data item in the detailed list;
[0051] S4. Creating the details table;
[0052] S5. Filling out the detailed list.
[0053] In this embodiment, the specific steps of step S1 are as follows: Figure 2 As shown, the process first retrieves the current working drawing document, then the active page (Sheet) of the drawing document, and then uses the retrieved active page operation handle to obtain the background view and working view of the active page. The parts list will be created in the container of the background view. The active view (e.g., front view or side view) within the working view can be obtained using the working view. Next, the features in the background view container are traversed for feature search. If the parts list is found, a message will be displayed indicating that the parts list already exists. If the parts list is not found, the 3D model document linked to the active view will be retrieved, and the document type will be determined. If the document type is not "*.CATProduct", a message will be displayed indicating a parts list creation error. Simultaneously, the drawing size information of the active page of the drawing document, i.e., the length and width of the drawing, will be retrieved, and the binding border distance 'a' of the drawing will be determined. The binding border is divided into a frame with a binding edge and a frame without a binding edge. Here, we take the binding border distance as an example: when the drawing size is A0, A1, or A2, the binding border distance is 10mm; otherwise, it is 5mm. Other parameters, such as the row height, column width, number of columns, and title block height of the schedule, are determined by the templates for the schedule and the title block of the drawing frame.
[0054] In this embodiment, the specific steps of step S2 are as follows: Figure 3 As shown, the process first retrieves a list of child components of the assembly file linked to the active view. Then, iterates through this list to obtain the part number of each child component and adds it to a string list (each part number is unique). Two loops are then used to iterate through this string list and compare whether two strings are the same. In the first loop, the count of each string is initialized to 1. In the second loop, when two strings are found to be the same, the second string is removed from the list, its count is incremented by 1, and the element at the corresponding position in the assembly sub-component list is removed. After the second loop, the count of the strings is added to an integer list. After two loops, there are no duplicate elements in the assembly sub-component list. Next, this new sub-component list is traversed to obtain the volume of each sub-component. If the volume is 0, the sub-component is a wireframe or surface feature, which is removed from the list, and the list count Q1 is decremented by 1.
[0055] In this embodiment, the specific steps of step S3 are as follows: Figure 4 As shown, based on the previously obtained drawing dimensions (H and V), the number of sub-components (Q), and some custom template data (a, b, B, h, l), the actual required number of columns S in the detailed list is calculated. If S is greater than 1, then the number of rows N in the last column of the detailed list is calculated. l Next, calculate the number of rows N in the first and second columns of the details table on the current page according to the formula. f and N mCalculate the maximum number of detail table columns S that the current page can accommodate. max Next, calculate the maximum number N of assembly sub-components that the current page can accommodate. max Finally, obtain the number of sub-components (Q) and N in the final sub-component list. max For comparison, if Q > N max This indicates that the current drawing cannot accommodate the current number of assembly sub-components, and a prompt will be made to use a larger drawing sheet. The calculation formula for the data is as follows:
[0056]
[0057] Where V is the vertical distance of the drawing, a is the binding border distance, b is the title block height, h is the list row height, H is the horizontal length of the drawing, l is the binding width of the drawing, B is the list width, Q is the number of sub-items, and ceil() is the round-up function.
[0058] In this embodiment, the specific steps of step S4 are as follows: Figure 5 As shown, the detailed table is positioned at the bottom left. The horizontal coordinate of the detailed table is calculated using the formula below. The detailed table has 7 columns and a row height of 7mm. First, determine if S is 1. If so, only one column of the detailed table needs to be created. In this case, the positioning point coordinates of the detailed table are (HaB, a+b), and the number of rows in the detailed table is Q+1. If S is not 1, it means at least two columns of the detailed table are needed. In this case, create the first column of the detailed table, with N rows. f The coordinates of the positioning point are (HaB, a+b). If j is less than S, then create a detailed table of intermediate columns in a loop, with N rows. m The positioning point is (Haj×B,a). After creating a column, j is incremented by one, and the relationship between j and S is checked again until j equals S. Then, the last column of the detail table is created. The last column of the detail table has N rows. l The coordinates of the positioning point are (HaS×B, a). After creating each column of the detail table, loop through each row, obtain the attributes of the assembly sub-part list, and call the table filling module to fill in the table. The formula for calculating the x-coordinate of the positioning point is:
[0059]
[0060] Where j is the number of columns in the details table, and C is the dynamic parameter for coordinate calculation;
[0061] In this embodiment, the specific steps of step S5 are as follows: Figure 6 As shown, after creating the detailed list, begin filling in the title bar for each column. The title bar includes the serial number, sub-component number, sub-component name, quantity, material, sub-component specifications, and remarks. For example... Figure 7The contents of the detailed table shown are derived from the product attributes of the assembly sub-components. A loop retrieves the attribute values, and another loop populates the modified text attributes in the detailed table. When there is only one column in the detailed table, the range for the assembly sub-component is [1, Q]. The range for the detailed table with a middle column is [...]. The last column of the details table obtains the interval [Q+1-N]. l , Q).
[0062] Figure 8 The image shows a detailed list created using this invention. The number of elements in the compiled assembly sub-part list is 77. The drawing size is A2 (420mm × 594mm). After calculation, N... l =26, N f =51, S =2. Therefore, this invention automatically creates two columns of detail tables and automatically fills in the detail tables by obtaining the attributes of the assembly's sub-components and modifying the text attributes. Unfilled attributes of assembly sub-components will be set to blank in the detail tables.
[0063] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for generating engineering drawing detail tables based on CATIA secondary development, characterized in that: Includes the following steps: Step S1: Obtaining engineering drawing document data and determining the status of the detailed table; Step S2: Obtaining and compiling the list of assembly sub-components; Step S3: Calculation of each data item in the detailed list; Step S4: Creating the details table; Step S5: Filling out the details form; The calculation of each data item in step S3 of the detail table includes calculating the number of rows in each column of the detail table. When there is only one column of detail table, the number of rows is Q+1. When there are two or more columns of detail table, the number of rows in the first column of detail table needs to be calculated as N. f The number of rows in the intermediate column details table is N. m and the number of rows N in the last column of the details table l The calculation formula is: (1) Where: V is the vertical height of the drawing, a is the border distance of the drawing, b is the height of the drawing title block, h is the row height of the bill of materials, Q is the number of elements in the final assembly sub-parts list, and S is the number of columns in the actual bill of materials.
2. The method for generating engineering drawing detail tables based on CATIA secondary development according to claim 1, characterized in that: The engineering drawing document data obtained in step S1 includes: the drawing sheet information of the currently active page of the engineering drawing, as well as the operation handles of the background view and working view of the active page, and the active view in the working view is also obtained. In step S1, the status of the detail table is judged to ensure that the detail table is not created repeatedly. By performing feature search on the detail table in the obtained background view container, if the detail table is found to exist, a prompt will be made that the detail table already exists.
3. The method for generating engineering drawing detail tables based on CATIA secondary development according to claim 1, characterized in that: The assembly sub-part list obtained in step S2 comes from the 3D model document linked to the active view in the working view, and the bill of materials is only used for assemblies. If it is detected that the obtained 3D model document type is not *.CATProduct, an error message will be displayed indicating that the bill of materials was created.
4. The method for generating engineering drawing detail tables based on CATIA secondary development according to claim 3, characterized in that: The statistical organization of the assembly sub-component list in step S2 includes the removal of duplicate elements and the counting of element counts. By obtaining the part number of each sub-component element and adding it to a string list, two loops are used to determine whether the part numbers are the same. Based on this, duplicate sub-components in the list are removed and the count of each removed element is incremented by 1. The statistical organization of the assembly sub-component list in step S2 also includes identifying whether the child elements in the sub-component element list are wireframe or surface models. This is determined by obtaining the volume of the sub-component element. If the volume is 0, the element is removed from the list.
5. The method for generating engineering drawing detail tables based on CATIA secondary development according to claim 1, characterized in that: The calculation of each data item in the detail table in step S3 also includes the actual number of columns S in the detail table and the maximum number of detail table columns S that the current page can accommodate. max The calculation formula is: (2) Where: H is the horizontal length of the drawing, l is the binding width of the drawing, B is the width of the bill of materials, and ceil is the round-up function.
6. The method for generating engineering drawing detail tables based on CATIA secondary development according to claim 5, characterized in that: The calculation of each data item in the detailed list in step S3 also includes determining whether the current drawing page can accommodate the current number of assembly sub-components. This is done by comparing the final number of assembly sub-components in the list with the maximum number that the drawing page can accommodate. If it cannot, the user will be prompted to change to a larger drawing size. The maximum number of assembly sub-components N that the current page can accommodate is... max The calculation formula is: (3)。