Method and system for automatically generating drawing catalog based on CAD (Computer Aided Design)
By creating and parsing attribute diagram boxes in CAD software, and automatically generating and updating drawing catalogs, the problem of manual input and adjustment of drawing catalogs in the existing technology is solved, and efficient, accurate and standardized directory management is achieved.
Patent Information
- Application Number
- CN202411307243.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-27
AI Technical Summary
Existing CAD software needs to manually enter and adjust a large amount of text information when creating drawing catalogs, which leads to high time consumption and error-proneness. The modification work is cumbersome and inconvenient to management when there are too many drawings or frequent modifications.
Provides a CAD-based drawing catalog automatic generation method. By obtaining CAD drawings, creating attribute drawing frames, analyzing the drawing frame information and inserting them into the drawings, modifying the drawing attributes according to the drawing catalog, and using the CAD API to realize automated directory generation and update.
Save time and energy, improve accuracy, ensure directory format consistency and standardization, facilitate management and retrieval, and reduce errors and omissions in manual modification.
Smart Images

Figure CN119202179A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CAD drawing generation, and in particular to a method and system for automatically generating a drawing catalog based on CAD. Background Art
[0002] CAD software mainly focuses on precise graphic drawing and design, and its editing functions for tables and text are relatively weak. When creating a drawing catalog, you need to manually enter and adjust a large amount of text information, including drawing numbers, names, drawing sizes, etc., and ensure that the format is neat and standardized, which takes a lot of time and effort. For drawings with a large number of drawings or drawings that need frequent modifications, such as adding, deleting, or adjusting the order of drawings, the corresponding modification work becomes tedious and prone to errors. Not only do you have to make changes on the drawing labels, but you also have to make corresponding changes in the catalog. Summary of the Invention
[0003] In order to solve the above-mentioned problems, the present invention provides a method and system for automatically generating a drawing catalog based on CAD, which can solve the problem that the existing method cannot automatically extract the required information from the drawing label and automatically generate the drawing catalog according to the hospital standard format.
[0004] In a first aspect, the present invention provides a method for automatically generating a drawing catalog based on CAD, which adopts the following technical solution: A method for automatically generating a drawing catalog based on CAD, comprising: Get CAD drawings; Create attribute frames based on the acquired CAD drawings; Perform frame parsing on the created attribute frame to obtain frame parsing information; Insert the frame parsing information into the drawing; Insert drawings into the drawing catalog based on the drawing frame parsing information; Modify the properties of the drawing according to the drawing catalog.
[0005] Furthermore, the creation of a property frame based on the acquired CAD drawing includes creating a property frame in the CAD software according to project requirements, including the drawing number, drawing name, project name, drawing date and designer, and at the same time, signature and seal positions are reserved in the property frame, and the signature and seal positions are realized through placeholders.
[0006] Furthermore, the frame parsing of the created attribute frame to obtain frame parsing information includes using a CAD API to read the created attribute frame, and parsing the attribute fields and reserved signature and seal positions in the attribute frame.
[0007] Furthermore, inserting the drawing frame parsing information into the drawing includes inserting the drawing frame parsing information into the drawing in the form of a block, which is achieved through a drag module provided by the CAD API, and after the insertion, declaring the name of the block in a prescribed format.
[0008] Furthermore, the drawing is inserted into the drawing catalog according to the frame parsing information, including finding the library block by traversing the block table in the drawing, obtaining the iterator of the library block through the Newlterator function, and then using the Next function to obtain each block object in the library block, thereby obtaining the frame parsing information of the drawing.
[0009] Furthermore, inserting the drawings into the drawing catalog according to the drawing frame parsing information also includes displaying the drawing frame parsing information in a table form on the front-end page, and inserting the catalog block into the document block table according to the drawing frame parsing information through the CAD API.
[0010] Furthermore, inserting the drawings into the drawing catalog according to the drawing frame parsing information also includes sorting the read drawing frame parsing information from small to large according to the drawing numbers, and generating a catalog in the hospital standard format for the sorted drawings.
[0011] In a second aspect, a CAD-based automatic drawing catalog generation system includes: The data acquisition module is configured to acquire CAD drawings; A drawing frame module is configured to create an attribute drawing frame according to the obtained CAD drawing; The parsing module is configured to perform frame parsing on the created attribute frame to obtain frame parsing information; The inserting module is configured to insert the drawing frame parsing information into the drawing; The catalog module is configured to insert a drawing catalog into the drawing according to the drawing frame parsing information; The modification module is configured to modify the properties of the drawing according to the drawing catalog.
[0012] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device for the method for automatically generating a CAD-based drawing catalog.
[0013] In a fourth aspect, the present invention provides a terminal device comprising a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded and executed by the processor to perform the method for automatically generating a CAD-based drawing catalog.
[0014] In summary, the present invention has the following beneficial technical effects: 1. Save time and energy There is no need to manually enter relevant information of drawings one by one, which greatly reduces repetitive work and allows you to devote more time and energy to core design work.
[0015] 2. Improve accuracy It avoids errors that may be caused by manual input, such as incorrect numbering, misspelling of names, inaccurate page numbers, etc., and ensures the accuracy of the catalog information.
[0016] 3. Consistency and standardization The generated directory format is unified and standardized, in line with industry standards and corporate requirements, and helps improve the professionalism and readability of the entire project documentation.
[0017] 4. Easy to update and maintain When drawings are added, deleted or modified, the catalog can be updated quickly and automatically to ensure that the catalog is always consistent with the actual drawings without having to worry about omissions or confusion that may occur due to manual modifications.
[0018] 5. Easy to manage and retrieve A clear and accurate catalog helps project team members quickly find the drawings they need, improving the efficiency of drawing management and use. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a schematic diagram of a method for automatically generating a drawing catalog based on CAD according to embodiment 1 of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below with reference to the accompanying drawings.
[0021] Example 1 Reference Figure 1 , a method for automatically generating a drawing catalog based on CAD in this embodiment includes the following steps: 1. Make an attribute frame: In CAD, create a drawing frame with attributes according to project requirements. These attributes include drawing number, drawing name, project name, drawing date, designer, etc.
[0022] Reserve spaces for signatures and seals, and declare them in a specified text format. Typically, these spaces use placeholders or specific text styles to allow for subsequent replacement or filling of actual content.
[0023] Make sure the size, proportions, and other details of the frame meet the standards and project requirements to ensure smooth progress in subsequent steps.
[0024] 2. Insert a frame Get the prepared drawing frame and read the frame information through the CAD API. This process includes parsing the various attribute fields and reserved positions in the drawing frame.
[0025] This information is processed to ensure that all properties and positions are correct. The processed drawing frame information will be inserted into the drawing in the form of a block.
[0026] The insertion position can be determined by the dragging function provided by the CAD API. The user can interactively select the insertion position in the drawing so that the drawing frame is placed exactly where required.
[0027] After the insertion is completed, the name of the block needs to be declared in the prescribed format for subsequent retrieval and editing.
[0028] 3. Quickly insert drawing catalog A drawing catalog is a special type of drawing frame that lists the number, name, drawing scale, drawing size, date, and version of all drawings in a project.
[0029] Read, process and insert into drawings via CAD API.
[0030] The user can interactively select the insertion location of the drawing catalogue just like inserting a drawing frame and declare its name in the prescribed format.
[0031] Ensure that the information in the drawing catalog is consistent with the actual project situation, and update the catalog content in a timely manner during subsequent modifications.
[0032] In the Insert Drawing Catalog dialog box, the read information can be sorted from smallest to largest based on the drawing numbers. If the order is incorrect for individual drawings, you can rearrange the numbers and move them up or down. After adjusting the order of the drawings, click OK to generate the catalog in the hospital standard format.
[0033] If you need to generate a catalog for some drawings, select the drawings you want to operate on, and then you can extract the frame information of the selected drawings, including the drawing number, drawing name, scale, drawing size, date and version. Perform the fifth step to generate a drawing catalog for some drawings.
[0034] We obtain the drawing document object, use the BlockTableID.getObject() method to retrieve the block table in the document, traverse the block table, and find the library block using the written identifier. We use the Newlterator function to obtain the block table iterator and then use the Next function to retrieve each block object in the block table. We also use the getName function to obtain the name of the block object and perform some operations in the loop to obtain the drawing information.
[0035] After obtaining all the frame information in the drawing, this information is displayed in a table on the front-end page. The user adjusts the table content according to the design requirements. After the adjustment is completed, the directory block in the template is obtained through the CAD API, and the attribute values are written to the block in sequence. Then the drawing document data is obtained, and the location where the user clicks on the drawing is obtained as the insertion directory location. The newly created template block is inserted into the block table of the document.
[0036] Example 2 The following is a specific example of a method and system for automatically generating a CAD-based drawing catalog. An architectural design company is designing a large commercial complex project. The project involves numerous drawings for various disciplines, such as architecture, structure, water supply and drainage, and electrical engineering. The drawings are numerous and require frequent revisions and adjustments during the design process.
[0037] 1. Make an attribute frame In CAD software, create a property frame based on project standards and requirements. This frame includes fields such as the drawing number, drawing name, project name, drawing date, and designer. Also, reserve space for signatures and seals using specific placeholders.
[0038] For architectural drawings, the property frames are as follows: Drawing No.: A-01 Drawing name: Commercial complex first floor plan Project Name: XX Commercial Complex Project Drawing date: September 10, 2024 Designer: Zhang San Signature location: [To be signed] Signature location: [To be signed] Insert a frame Read the prepared drawing frame information through the CAD API, including various attribute fields and reserved positions. After ensuring that this information is correct, insert the drawing frame into the drawing as a block.
[0039] Use the drag-and-drop functionality provided by the CAD API to select a suitable location in the drawing to insert the block. Once inserted, declare the block name in the specified format, such as "Architectural Frame - A-01".
[0040] 2. Quickly insert drawing catalog A drawing catalog is also a special drawing frame that lists the number, name, drawing scale, drawing size, date, version and other information of all drawings in the project.
[0041] The drawing frame information of all drawings in the project is read through the CAD API, processed, and displayed in a table on the front-end page. Designers can adjust the table content according to design requirements.
[0042] The drawing catalogue is as follows: | Drawing No. | Drawing Name | Drawing Scale | Drawing Size | Date | Version | |----|----|----|----|----|----| |A-01 | Commercial Complex First Floor Plan | 1:100 | A1 | September 10, 2024 | V1.0 | |A-02 | Commercial Complex Second Floor Plan | 1:100 | A1 | September 12, 2024 | V1.0 | |...|...|...|...|...|...|.
[0043] In the Insert Drawing Catalog dialog box, you can sort the loaded information by drawing number. If the order of individual drawings is incorrect, you can rearrange the numbers and move them up or down. Once the order of the drawings is correct, click OK to generate the catalog in accordance with the institute's standard format.
[0044] 3. Modify drawing properties according to the drawing catalog During the design process, the name of a drawing was changed. For example, the commercial complex first floor plan with drawing number A-01 needs to be renamed "commercial complex first floor revised plan."
[0045] First, find the entry corresponding to the drawing in the drawing catalog and modify the drawing name.
[0046] Then, through the CAD API, we traverse all drawings and find the drawing corresponding to the drawing number "A-01". We then locate the drawing's property frame and find the drawing name field.
[0047] Use the editing function of the CAD API to write the new drawing name "Revised Floor Plan of the First Floor of Commercial Complex" into the Drawing Name field in the Drawing Properties frame to ensure that the drawing properties are consistent with the drawing catalog.
[0048] Example 3. This embodiment provides a CAD-based automatic drawing catalog generation system, including: The data acquisition module is configured to acquire CAD drawings; A drawing frame module is configured to create an attribute drawing frame according to the obtained CAD drawing; The parsing module is configured to perform frame parsing on the created attribute frame to obtain frame parsing information; The inserting module is configured to insert the drawing frame parsing information into the drawing; The catalog module is configured to insert a drawing catalog into the drawing according to the drawing frame parsing information; The modification module is configured to modify the properties of the drawing according to the drawing catalog.
[0049] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for a method for automatically generating a drawing catalog based on CAD.
[0050] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded and executed by the processor for the method for automatically generating a drawing catalog based on CAD.
[0051] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for automatically generating a drawing catalog based on CAD, characterized in that: include: Get CAD drawings; Create attribute drawing frames based on the acquired CAD drawings; Perform frame parsing on the created attribute frame to obtain frame parsing information; Insert the frame analysis information into the drawing; Insert drawings into the drawing catalog according to the drawing frame analysis information; Modify the properties of the drawing according to the drawing catalog.
2. The method for automatically generating a drawing catalog based on CAD according to claim 1, characterized in that: The creating of the property frame according to the acquired CAD drawing includes creating the property frame in the CAD software according to the project requirements, including the drawing number, drawing name, project name, drawing date and designer, and at the same time, the property frame reserves a signature and seal position, and the signature and seal position is realized by a placeholder.
3. The method for automatically generating a drawing catalog based on CAD according to claim 2, characterized in that: The frame parsing of the created attribute frame to obtain the frame parsing information includes using the CAD API to read the created attribute frame, and parsing the attribute fields and the reserved signature and seal positions in the attribute frame.
4. The method for automatically generating a drawing catalog based on CAD according to claim 3, characterized in that: The inserting of the drawing frame parsing information into the drawing includes inserting the drawing frame parsing information into the drawing in the form of a block, which is implemented by a drag module provided by the CAD API, and after the insertion, declaring the name of the block in a prescribed format.
5. The method for automatically generating a drawing catalog based on CAD according to claim 4, characterized in that: The method of inserting the drawing into the drawing catalog according to the frame parsing information includes finding the library block by traversing the block table in the drawing, obtaining the iterator of the library block through the Newlterator function, and then using the Next function to obtain each block object in the library block, thereby obtaining the frame parsing information of the drawing.
6. The method for automatically generating a drawing catalog based on CAD according to claim 5, characterized in that: The method of inserting a drawing catalog into the drawing according to the drawing frame parsing information also includes displaying the drawing frame parsing information on the front-end page in a table format, and inserting the catalog block into the document block table according to the drawing frame parsing information through the CAD API.
7. The method for automatically generating a drawing catalog based on CAD according to claim 6, characterized in that: The method of inserting drawings into a drawing catalog according to the drawing frame analysis information also includes sorting the read drawing frame analysis information from small to large according to the drawing numbers, and generating a catalog in the hospital standard format for the sorted drawings.
8. A CAD-based drawing catalog automatic generation system, characterized in that: include: The data acquisition module is configured to acquire the CAD drawing; A drawing frame module is configured to create a property drawing frame according to the acquired CAD drawing; The parsing module is configured to perform frame parsing on the created attribute frame to obtain frame parsing information; An inserting module is configured to insert drawing frame parsing information into the drawing; The catalog module is configured to insert a drawing catalog into the drawing according to the drawing frame parsing information; The modification module is configured to modify the properties of the drawing according to the drawing catalog.
9. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executing the method according to claim 1 .
10. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executing the method as claimed in claim 1 .
Citation Information
Cited By
Method and system for modifying drawing frames and drawing labels of CAD drawings in batches
CN119830114A
AI-based picture frame generation and intelligent arrangement method and system, terminal and medium
CN121259261A
