Method and system for generating AutoCAD drawing layouts with automatically updated title bars in batches

By creating dynamic blocks of drawing frames in AutoCAD and developing plug-ins, the automatic generation of drawing layout and automatic update of title bar information are achieved, which solves the problems of cumbersome and insufficient flexibility in the drawing printing process in the existing technology, and improves the drawing management and printing efficiency.

CN119513950AActive Publication Date: 2025-02-25CHANGJIANG SURVEY PLANNING DESIGN & RES CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411240198.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-02-25
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

After drawing the drawing in AutoCAD, adding drawing frames, manually filling in or modifying drawing title bar information and completing printing is cumbersome, inefficient, and the existing batch printing plug-in is not flexible enough to achieve the generation of a single virtual print file at one time. The title bar information is frequently modified, resulting in huge workload.

Method used

By creating dynamic blocks of graph frames containing title bar information in AutoCAD, and using secondary development technology to develop plug-ins, we realize the automated operation of dynamic blocks of graph frames, generate drawing layouts, and link them to the reference object of graph frames through custom characteristics of the drawing set to automatically update the title bar information.

Benefits of technology

It greatly improves the generation efficiency of drawing layout, realizes automatic update of drawing title bar information, reduces manual operations, improves the efficiency and consistency of drawing management, and can complete batch printing and virtual printing without opening the drawing file.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513950A_ABST
    Figure CN119513950A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of engineering design drawing, and discloses a method for generating AutoCAD drawing layouts with automatically updated title bars in batches. According to the method, a full-automatic operation process of identifying a specific drawing frame dynamic block reference object in a model view and correspondingly generating a drawing layout is completed through a secondarily developed plug-in, so that a tedious step of manually generating a plurality of drawing layouts is avoided; by means of the hyperlink characteristic of the attribute block, the user-defined characteristic of the drawing set is linked to the specific drawing frame dynamic block reference object, the effect that all drawing title bar information is completely updated through one-time modification is achieved, the drawing layout generated in batches has the characteristic of being capable of being directly printed, and the printing efficiency is improved. A batch printing function can be realized by utilizing a drawing set or drawing layout multi-selection printing operation of AutoCAD, so that the drawing efficiency is improved; the invention also provides a non-transitory readable recording medium storing the program of the method and a system comprising the medium, and the program can be called through a processing circuit to execute the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of engineering design and drawing, and specifically discloses a method and a system for batch generating AutoCAD drawing layouts with automatically updated title bars. Background Art

[0002] In the fields of construction engineering, civil engineering, and mechanical manufacturing, AutoCAD is a common software for engineering design in these industries. However, after AutoCAD completes the drawing, it is very cumbersome to add drawing frames, manually fill in or modify the drawing title bar information, and print out the drawing. The common operations in actual production are as follows:

[0003] Method 1: Do not use the AutoCAD layout function at all, draw all the contents directly in the model view, place the drawing frame manually, and manually write the title bar information in each drawing frame, such as the drawing name, drawing number, printing date, etc. Then use the built-in printing prompt window. For each print, you need to select the outer edge of the drawing frame, select the printer or plotter, select the printing style, and print the drawings represented by each drawing frame in turn. This method requires manual operation for printing each drawing, and the steps are very cumbersome and the efficiency is very low.

[0004] Method 2: Mix model view and layout view. Usually, a part of the drawing work is completed in the model view, and then a default drawing layout page is generated by AutoCAD. One or more drawing frames are manually drawn, the frame title bar information is manually filled in or modified, and the viewport is manually placed within the inner edge of each drawing frame to link to a certain area in the model view. This method does not use layout range printing. It is still necessary to manually select each drawing frame range in the layout during the printing process to determine the printing range each time (each drawing), and manually configure the printing parameters during each printing process. Therefore, this method is similar to method 1, the steps are very cumbersome, and the efficiency is very low.

[0005] Method 3, based on Method 1 and Method 2, use the function of AutoCAD common block to make the drawing frame into a common block, and then use secondary development technology to write a plug-in for batch printing function, find the reference object of the above-mentioned drawing frame common block in the model view or layout view, and use the program to complete the printing of drawings in batches. The printing range of each drawing is set as the outer edge of the drawing frame common block by the program, and all printing processes use the same printer / plotter and the same printing style. There are many batch printing plug-ins on the market, most of which are developed based on Method 3. Although this method has a certain efficiency improvement, the flexibility of batch printing is insufficient and there are still many limitations. First, when a project needs to be printed, it is still necessary to manually open all graphic files and run the batch printing command for each opened graphic file. This process is often time-consuming; second, this method is difficult to generate a single virtual print file at one time, such as a single dwf or a single pdf file. Third, this method uses common blocks to locate the printing range of drawings, but the title bar information of drawings is still filled in manually. In the actual production process, the content and title bar of drawings are frequently modified, and reprinting after modification is also very frequent. When there are a large number of graphic files in the project, it is very laborious and time-consuming to open, modify, and print each file. Finally, this type of batch printing plug-in usually cannot select only part of the frame content for printing after scanning all the frames. The selection is not flexible enough and cannot meet the user's printing needs well. Summary of the invention

[0006] In order to overcome the above shortcomings and make full use of the characteristics of AutoCAD drawing sets that can batch update and print drawing layouts, the present invention provides a method for batch generating AutoCAD drawing layouts with automatically updated title blocks, comprising the following steps:

[0007] S1: A frame dynamic block containing title block information is created in AutoCAD, and each insertion of a frame dynamic block in a model view generates a frame dynamic block reference object having frame dynamic block attributes; the frame dynamic block can automatically adjust the individual data of each frame dynamic block reference object by selecting a drawing format option, and the individual data includes but is not limited to the frame dynamic block name, drawing format size, drawing area size, title block style, and dynamic fields related to drawing information in the title bar; the dynamic fields are expressed using frame dynamic block attributes, and the frame dynamic block attributes are linked to the attributes of the drawing set;

[0008] S2: Develop a plug-in using AutoCAD secondary development technology, wherein the plug-in has an interactive interface that prompts how to select a specific frame dynamic block reference object in a model view in AutoCAD, and completes the following steps:

[0009] In the opened AutoCAD drawing file, according to one or more drawing frame dynamic block reference objects in the selected model view, a drawing layout is generated corresponding to each drawing frame dynamic block reference object, and the page settings of the drawing layout are automatically configured;

[0010] Inserting a layout view frame dynamic block reference object and a polygonal viewport within the printable range of each drawing layout, wherein the polygonal viewport completely overlaps with the drawing area polygon in the layout view frame dynamic block reference object, and the polygonal viewport is aligned with the drawing area of ​​the corresponding frame dynamic block reference object in the model view;

[0011] S3: inserting one or more frame dynamic blocks into the model view according to printing requirements, wherein the frame dynamic block reference objects are set to be able to be arbitrarily scaled or rotated; loading the plug-in into the AutoCAD software, and the user selects the same type of frame dynamic block reference objects through the interactive interface to generate one or more drawing layouts;

[0012] S4: Create a new drawing set, add matching custom drawing set attributes and assign values, add the drawing layout generated above into the drawing set, and automatically complete the synchronous update of dynamic fields in the drawing layout frame through linking;

[0013] S5: Select one or more drawing layouts by direct selection or selection in the drawing set for batch printing.

[0014] Preferably, the AutoCAD plug-in development technology includes but is not limited to AutoLisp, objecARX, .net API and Javascript API programming tools.

[0015] Preferably, the personality data is inputted by any of the following methods:

[0016] Select one or more inserted frame block reference objects in the AutoCAD model view as personality data;

[0017] Enter the names of one or more inserted drawing block blocks as personality data in the AutoCAD command prompt bar or dialog box.

[0018] Preferably, the page setup for automatically configuring the drawing layout comprises the following steps:

[0019] One or more files containing layout page setting parameter rules are prepared in advance, saved in a designated location, and automatically read by the plug-in program;

[0020] Or generate a graphical user interface such as a pop-up window or panel for the user to input page setup parameters for generating the drawing layout.

[0021] Preferably, the page setup parameters include but are not limited to the printer / plotter name, drawing size, print area-print range, print offset, print style, print options, and graphic direction.

[0022] Preferably, the method for establishing a link between the attributes of the drawing frame dynamic block and the attributes of the drawing set is: use AutoCAD's own function command to create a new drawing set, and add custom properties to the newly created drawing set. For the drawing layout added thereto, the dynamic field in the title bar of the drawing frame dynamic block reference object in its layout view is hyperlinked to the custom properties of the drawing set and updated synchronously.

[0023] Preferably, each dynamic block reference object in the model view is used to locate the spatial range of each drawing, and its drawing area is the drawing area of ​​the final printed drawing. In order to match the content to be printed, the operation of inserting the frame dynamic block also includes the steps of adjusting the position, scaling and rotation angle of the dynamic block reference object.

[0024] Preferably, the printing includes physical printing or generating a virtual printing file, wherein the virtual printing file includes but is not limited to pdf, dwf, dwfx, jpg, png type files.

[0025] Another solution of the present invention is to provide a non-transitory readable recording medium for storing one or more programs containing multiple instructions. When the instructions are executed, the processor will execute the above-mentioned method for batch generating AutoCAD drawing layouts with automatic title bar updates.

[0026] Another embodiment of the present invention is to provide a geographic data encryption system, including a processing circuit and a memory electrically coupled thereto, wherein the memory is configured to store at least one program, wherein the program includes a plurality of instructions, and the processing circuit runs the program to execute the above-mentioned method for batch generating AutoCAD drawing layouts with automatic title bar updates.

[0027] Compared with the prior art, the present invention produces the following beneficial effects:

[0028] The present invention aims at the problems of many manual operation steps, huge time consumption, poor consistency of modified information, and difficult drawing management in the process of drawing integrated management, drawing title bar information modification, and printing / publishing in the engineering design industry. The present invention adopts AutoCAD secondary development technology to compile a universal plug-in to achieve efficient drawing layout generation and management, modification of drawing title bar information, and batch printing and publishing of drawings (including virtual printing).

[0029] Through secondary development of plug-in technology, the fully automated process from identifying the dynamic block reference object of the frame in the model view to the corresponding generated layout is completed, avoiding the complicated steps of manually generating multiple directly printable layouts, greatly improving the efficiency of layout generation; making full use of the "one block definition, multiple appearances" feature of dynamic blocks to achieve the positioning and marking of different format printing areas in the model view. The use of dynamic block frame technology is not only the basis for the realization of the functions of this plug-in system, but also can enhance the neatness and orderliness of graphic files; making full use of the "hyperlink" feature of the attribute block to link the custom properties of the drawing set to the dynamic block reference of the frame In the example, by modifying the custom property value in the drawing set, the corresponding link attribute in the title bar of the dynamic block reference object can be automatically modified, achieving the effect of "one modification, all drawing title bar information is updated", which can not only enhance the consistency of drawing information and reduce errors and omissions, but also complete the update of title bar content without opening the graphic file, greatly improving the modification efficiency of drawings; make full use of the layout management function of the drawing set, implement selective batch printing of specified parts or all drawings in the drawing layout list in the drawing set, and the whole printing process can be completed automatically without opening any drawing file, greatly improving the printing efficiency; BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a schematic diagram of a frame dynamic block production style in an embodiment of the present invention;

[0031] Figure 2 is a schematic diagram of dynamic block query parameters in an embodiment of the present invention;

[0032] Figure 3 is a schematic diagram of a dynamic block title bar in an embodiment of the present invention;

[0033] Figure 4 is a schematic diagram of dynamic block title bar attribute linking in an embodiment of the present invention;

[0034] Figure 5 It is a schematic diagram of inserting a frame block into an AutoCAD model view in an embodiment of the present invention;

[0035] Figure 6 It is a list diagram of page setting parameters preset when automatically generating a drawing layout in an embodiment of the present invention;

[0036] Figure 7 It is a software interface after the drawing layout is generated in the embodiment of the present invention;

[0037] Figure 8 It is a page setting interface for automatically generating a drawing layout using a plug-in in an embodiment of the present invention;

[0038] Fig. 9It is a screenshot of the custom properties and assignments of the drawing set in an embodiment of the present invention;

[0039] Fig.10 It is a comparison diagram of dynamic fields before and after adding a drawing set in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be described below in conjunction with the drawings in the embodiments of the present invention. The described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making innovative efforts are within the scope of protection of the present invention.

[0041] In conjunction with the drawings of the specification, a method for batch generating AutoCAD drawing layouts with automatically updated title blocks is implemented as follows: The specific steps of this technical solution are as follows:

[0042] In AutoCAD, a dynamic block containing a title bar is created. The dynamic block contains two basic contents: the inner and outer borders of the frame and the title bar. Taking the water conservancy and hydropower engineering industry as an example, the dynamic block style created is as follows: Figure 1 As shown in the figure, the blue marked dynamic block parameters are used; the query parameter list is as follows Figure 2 As shown; one of the title bars produced is as follows Figure 3 As shown in the figure, the red circled text is "block attribute", which is the dynamic field mentioned in the invention content. These attributes are all hyperlinked. For example, "Project Name 1" is linked to the current drawing set custom property "Project Name 1" (such as Figure 4 As shown), when the value of "Project Name 1" in the drawing set is modified, the value of "Project Name 1" in the frame block in the drawing layout will also be automatically updated and displayed; other block attributes in the title bar are similarly made and will not be repeated here.

[0043] Utilize AutoCAD plug-in development technology, including but not limited to using AutoLisp, objecARX, .net API, Javascript API and other tools to develop functional plug-ins, and use plug-in loading commands such as appload, netload, script and other commands in AutoCAD to load the plug-in.

[0044] In the model view drawing interface of AutoCAD, one or more dynamic blocks with arbitrary scaling and rotation angles are inserted according to actual needs. For the convenience of explanation, the present invention inserts 4 frame dynamic blocks that have been made in step S1 in the AutoCAD model view, and selects the sizes of A3, A2, A1 and A0 respectively, adjusts the global scale of the dynamic block to 100, sets the rotation angle of A3, A2, and A1 dynamic blocks to 15° to match the content that needs to be printed. Figure 5 shown.

[0045] After loading the plug-in developed in the previous steps, you can execute the command to batch generate drawing layouts. Follow the command prompts and select any of the frame dynamic blocks. The plug-in automatically searches for all the same type of dynamic blocks in the model view and obtains four frame dynamic block reference objects. Figure 6 ) to find the page setup parameters that match the dynamic block size of the drawing frame, and automatically generate 4 drawing layouts based on these parameters, each of which corresponds to a page of drawings to be printed / published in the model view. After opening one of the generated drawing layouts, the software interface is as follows Figure 7 Open the page setup interface of the drawing layout, as shown Figure 8 As shown in the figure, you can see that the printer / plotter name, drawing size, and plot style table of the drawing layout are all the same as Figure 6 The A3 format shown in the figure is consistent. And the print area (print range) has been set to "Layout", which means that the drawing layout can be automatically printed / published.

[0046] Use the AutoCAD built-in function command to create a new drawing set, add all the custom properties required for the dynamic block title block attributes in the drawing set, and then assign values ​​to these custom properties. A typical example of a drawing set custom property is as follows: Fig. 9 As shown. Use the built-in function command of AutoCAD to select the drawing layout and add it to the newly created drawing set. AutoCAD software will automatically update the title bar information in the drawing layout frame. The drawing layout frame title bar before and after adding to the drawing set is as follows: Fig.10 As shown in the figure, before adding the drawing set, the "####" in the title bar indicates that it is not linked to the corresponding property value. After adding the drawing set, the dynamic block attributes in the title bar are updated to the corresponding property values ​​in the drawing set. If you need to modify the drawing set properties later, you can modify them through the AutoCAD Sheet Set Manager. Open the Sheet Set Properties dialog box through the right-click menu and modify the custom property values. After the modification, the drawing frame title bar in the drawing layout will be automatically updated.

[0047] Use the built-in functions of the AutoCAD drawing set to operate the drawing layouts added to it. All drawing layouts added to the drawing set are displayed as a drawing list. These list items can be selected one or more at the same time. The selected drawing layouts can be directly published through the drawing set function to complete batch printing / publishing of drawings.

[0048] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computers, available storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0049] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0050] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0051] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0052] Therefore, compiling the above method steps into a program and then storing it on a hard disk or other non-transitory storage medium constitutes the technical solution of "a non-transitory readable recording medium" of the present invention; and electrically connecting the storage medium to a computer processor, which can complete the batch generation of AutoCAD drawing layouts with automatic title bar updates through data processing, constitutes the technical solution of "a system for batch generation of AutoCAD drawing layouts with automatic title bar updates" of the present invention.

[0053] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks, characterized in that The following steps are involved: S1: A frame dynamic block containing title block information is created in AutoCAD, and each insertion of a frame dynamic block in a model view generates a frame dynamic block reference object having frame dynamic block attributes; the frame dynamic block can automatically adjust the individual data of each frame dynamic block reference object by selecting a drawing format option, and the individual data includes but is not limited to the frame dynamic block name, drawing format size, drawing area size, title block style, and dynamic fields related to drawing information in the title bar; the dynamic fields are expressed using frame dynamic block attributes, and the frame dynamic block attributes are linked to the attributes of the drawing set; S2: Develop a plug-in using AutoCAD secondary development technology, wherein the plug-in has an interactive interface that prompts how to select a specific frame dynamic block reference object in a model view in AutoCAD, and completes the following steps: In the opened AutoCAD drawing file, according to one or more drawing frame dynamic block reference objects in the selected model view, a drawing layout is generated corresponding to each drawing frame dynamic block reference object, and the page settings of the drawing layout are automatically configured; Inserting a layout view frame dynamic block reference object and a polygonal viewport within the printable range of each drawing layout, wherein the polygonal viewport completely overlaps with the drawing area polygon in the layout view frame dynamic block reference object, and the polygonal viewport is aligned with the drawing area of ​​the corresponding frame dynamic block reference object in the model view; S3: inserting one or more frame dynamic blocks into the model view according to printing requirements, wherein the frame dynamic block reference objects are set to be able to be arbitrarily scaled or rotated; loading the plug-in into the AutoCAD software, and the user selects the same type of frame dynamic block reference objects through the interactive interface to generate one or more drawing layouts; S4: Create a new drawing set, add matching custom drawing set attributes and assign values, add the drawing layout generated above into the drawing set, and automatically complete the synchronous update of dynamic fields in the drawing layout frame through linking; S5: Select one or more drawing layouts by direct selection or selection in the drawing set for batch printing.

2. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 1, characterized in that: AutoCAD plug-in development technologies include but are not limited to AutoLisp, objecARX, .net API and JavascriptAPI programming tools.

3. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 2, characterized in that: Enter the personality data using any of the following methods: Select one or more inserted frame block reference objects in the AutoCAD model view as personality data; Enter the names of one or more inserted drawing block blocks as personality data in the AutoCAD command prompt bar or dialog box.

4. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 3, characterized in that: Automatically configuring the page setup for a drawing layout involves the following steps: One or more files containing layout page setting parameter rules are prepared in advance, saved in a designated location, and automatically read by the plug-in program; Or generate a graphical user interface such as a pop-up window or panel for the user to input page setup parameters for generating the drawing layout.

5. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 4, characterized in that: Page setup parameters include but are not limited to printer / plotter name, paper size, print area-print range, print offset, print style, print options, and drawing orientation.

6. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 5, characterized in that: The method for establishing a link between the drawing frame dynamic block attributes and the drawing set attributes is: use AutoCAD's own function command to create a new drawing set, and add custom properties to the newly created drawing set. For the drawing layout added thereto, the dynamic field in the title bar of the drawing frame dynamic block reference object in its layout view is hyperlinked to the custom properties of the drawing set and updated synchronously.

7. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 6, characterized in that: Each dynamic block reference object in the model view is used to locate the spatial range of each drawing, and its drawing area is the drawing area of ​​the final printed drawing. In order to match the content to be printed, the operation of inserting a drawing frame dynamic block also includes the steps of adjusting the position, scaling and rotation angle of the dynamic block reference object.

8. A method for batch generating AutoCAD drawing layouts with automatically updated title blocks as claimed in claim 7, characterized in that: The printing includes physical printing or generating a virtual printing file, wherein the virtual printing file includes but is not limited to pdf, dwf, dwfx, jpg, and png type files.

9. A non-transitory readable recording medium for storing one or more programs including a plurality of instructions, characterized in that: When the instruction is executed, the processor is caused to execute a method for batch generating AutoCAD drawing layouts with automatically updated title blocks as described in any one of claims 1-8.

10. A system for batch generating AutoCAD drawing layouts with automatically updated title blocks, comprising a processing circuit and a memory electrically coupled thereto, characterized in that: The memory configuration stores at least one program, the program includes a plurality of instructions, and the processing circuit runs the program to execute a method for batch generating AutoCAD drawing layouts with automatic title block updates according to any one of claims 1-8.

Citation Information

Patent Citations

  • Batch printing method for CAD drawings

    CN113190192A

  • Batch printing method, system and equipment for drawings and computer readable storage medium

    CN113495700A

  • Automatic batch filling method for drawing frame title bar attribute information of CAD drawing

    CN114398857A

  • System and method for automatically drawing set of distribution network single line diagram based on multivariate data fusion

    CN114996886A

  • Parameterized picture frame construction method for AutoCAD

    CN115248970A