CN109933765B - Method for extracting Excel table content to CAD table - Google Patents
Method for extracting Excel table content to CAD table Download PDFInfo
- Publication number
- CN109933765B CN109933765B CN201910186498.8A CN201910186498A CN109933765B CN 109933765 B CN109933765 B CN 109933765B CN 201910186498 A CN201910186498 A CN 201910186498A CN 109933765 B CN109933765 B CN 109933765B
- Authority
- CN
- China
- Prior art keywords
- program
- cad
- excel
- data
- window
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention relates to a method for extracting Excel table content to a CAD table, which comprises the following steps of utilizing a Visual LISP module to carry out secondary development on a CAD program, so that the CAD program carries out the following processing: judging the correctness of Excel table data and format of the data to be read, carrying out batch reading and specific operation processing on cells with the data in the Excel, and writing a program result into a table of the CAD template file according to a specific text format and specific coordinates. The method for extracting the Excel table content to the CAD table is simple and quick in a secondary development method of the CAD program, the CAD program subjected to secondary development carries out quick operation processing on Excel table data, one or more tables of the required CAD are formed at one time, and the working efficiency and the accuracy of the tables are improved.
Description
Technical Field
The invention relates to the field of automatic CAD secondary development, in particular to a method for extracting Excel form contents into CAD forms.
Background
AutoCAD (Autodesk Computer Aided Design) is computer-aided drawing software developed by Autodesk in 1982 for two-dimensional drawing, detailed drawing, design documentation and basic three-dimensional design, and has become a widely used drawing tool internationally. AutoCAD has a good user interface, and can perform various operations through interaction menu or command modes.
In engineering, due to the diversity of drawings, the content in the Excel form is often required to be copied to the AutoCAD form, and the manual data copying mode is not only low in efficiency, but also easy to make mistakes, so that how to efficiently and accurately extract the data in the Excel form to the CAD drawing is very important.
In view of this, the present patent provides a method for extracting Excel table contents from CAD tables to solve the above-mentioned problems.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for selectively extracting the Excel form content from the CAD form. The secondary development method of the CAD program is simple and quick, the CAD program subjected to secondary development carries out quick operation processing on Excel table data, one or more tables of the required CAD are formed at one time, and the working efficiency and the accuracy of the tables are improved.
In order to achieve the above purpose, the invention is realized by adopting the following technical scheme:
a method for selectively extracting from Excel table content to CAD tables, the method utilizing Visual LISP module to secondarily develop CAD programs such that the CAD programs perform the following processes: judging the correctness of Excel table data and format of the data to be read, carrying out batch reading and specific operation processing on cells with the data in the Excel, and writing a program result into a table of the CAD template file according to a specific text format and specific coordinates.
A method for selectively extracting from Excel table contents to CAD tables, provided that CAD software has installed a Visual LISP module, comprising the specific steps of:
1) Preparing an Excel file needing to extract data, wherein each item of content of an Excel table head is fixed, and cell content and format meet program requirements;
2) Drawing a target table template in a CAD program, defining the lower left point of the table as coordinates (0, 0), and naming a template file as 'extract Excel content. Dwg';
3) Opening CAD software, writing a program in a Visual LISP editor, inserting a window, displaying the window in the window process, and inputting proper data and information in the window; and the program automatically calculates and processes the data read by the Excel table and the data and information in the window. After the program is completed, compiling and storing the program as vlx, and copying the program to a support path of the CAD program;
4) Adding a command button "extract Excel form" in the CAD software and directing the command to the program process in step 3);
5) Clicking a button in a CAD window to extract an Excel form, popping up the form in the step 3), inputting proper data and information in the form, automatically carrying out background automatic operation processing on the data and information after Excel reading by a program, and forming a required form in the CAD according to coordinate points set by the program.
The method for extracting the content of the Excel table into the CAD table is characterized by reading the specific cells of the Excel table, performing operation processing on the data in a required mode through a program, and writing the result into the appointed position of the CAD table.
The beneficial effects of the invention are as follows:
by adopting the technical scheme, the method for extracting the Excel form content to the CAD form has the advantages that compared with a manual extraction mode, the program automatically reads the Excel form content, one or more forms of the required CAD form are formed at one time, and the working efficiency and the form accuracy are improved.
Drawings
FIG. 1 is a flow chart of a method for extracting Excel sheet content into CAD sheets according to the present invention;
FIG. 2 is a diagram of functions and data examples of inserting frames in a method of extracting Excel sheets into CAD sheets according to the present invention.
Detailed Description
The following description of the technical solutions in the method according to the present invention will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described method is only a part of the technical solutions of the present invention, not all the technical solutions. Any person skilled in the art should, within the scope of the present disclosure, cover all equivalent substitutions or modifications according to the technical solution of the present invention and the inventive concept thereof.
As shown in FIG. 1, the method for extracting Excel table contents from CAD table comprises the following specific steps of:
1) Preparing an Excel file needing to extract data, wherein each item of content of an Excel table head is fixed, and cell content and format meet program requirements;
2) Drawing a target form template in a CAD program, defining the lower left point of the form as coordinates (0, 0), naming a template file as extracting Excel content dwg, and for the same type of drawing, not needing to newly construct the template file each time;
3) Opening CAD software, writing a program in the Visual LISP editor, inserting the program into a window, displaying the window in the function of the window process, and inputting proper data and information into the window as shown in FIG. 2; and the program automatically calculates and processes the data read by the Excel table and the data and information in the window. Carrying out coordinate positioning according to the table in the CAD template file in the step 2), and writing Excel raw data and a result after processing operation into specific coordinates; after the program is completed, compiling and storing the program as vlx (for example, acre.vlx, acre is set by a user), and then copying the program to a support path of the CAD program;
4) Adding a command button "extract Excel form" in the CAD software and directing the command to the program process in step 3); after the command button is created, the command button can be reused later;
5) Clicking a button in a CAD window to extract an Excel form, popping up the window in the step 3), inputting proper data and information in the window, automatically performing background automatic operation processing on the data and information after the Excel is read by a program, popping up a program error description if the content and format of the Excel form do not meet the program requirements, and returning to the step 1) to modify the Excel form; if the content and the format of the Excel form are correct, the program automatically writes the Excel raw data and the result after processing operation into specific coordinates in the CAD template file created in the step 2), and forms the required form in the CAD.
Claims (2)
1. A method for extracting Excel form content to CAD form, provided that CAD software has installed Visual LISP module, characterized by that, the specific steps of the method are:
1) Preparing an Excel file of which the data needs to be extracted, wherein each item of content of an Excel table head is fixed, and the content and format of cells meet the program requirements;
2) Drawing a target table template in a CAD program, defining the lower left point of the table as coordinates (0, 0), and naming the table as 'extract Excel content. Dwg';
3) Opening CAD software, writing a program in a visual LISP editor, inserting a window, displaying the window in the window process, and inputting data and information required by a user in the window; then the program automatically calculates the data read by the Excel table and the data and information in the window; after the program is completed, compiling and storing the program as vlx, and copying the program to a support path of the CAD program;
4) Adding a command button "extract Excel form" in the CAD software and directing the command to the program process in step 3);
5) Clicking a button in a CAD window to extract an Excel form, popping up the window in the step 3), inputting proper data and information in the window, automatically carrying out background operation processing on the data and information after Excel reading by a program, and forming a required form in the CAD according to coordinate points set by the program;
according to engineering requirements, a programming program carries out data operation on each cell of an Excel table, writes the data into specific coordinates of a CAD template file, and sets font style, word height, word width and alignment modes on the words.
2. The method of claim 1, wherein the cells of the Excel in which the data is stored are read in batch and processed by specific operations, and if the content or data format of a cell is not required by the program, the program gives error information to adjust the modification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910186498.8A CN109933765B (en) | 2019-03-12 | 2019-03-12 | Method for extracting Excel table content to CAD table |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910186498.8A CN109933765B (en) | 2019-03-12 | 2019-03-12 | Method for extracting Excel table content to CAD table |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109933765A CN109933765A (en) | 2019-06-25 |
CN109933765B true CN109933765B (en) | 2023-05-23 |
Family
ID=66986902
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910186498.8A Active CN109933765B (en) | 2019-03-12 | 2019-03-12 | Method for extracting Excel table content to CAD table |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109933765B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569626B (en) * | 2019-10-28 | 2023-04-07 | 云南瀚哲科技有限公司 | CAD house type graph batch plotting method based on data sheet |
CN111796868B (en) * | 2020-07-07 | 2023-10-27 | 无锡中粮工程科技有限公司 | Method for realizing interaction of CAD enhanced attribute block and Excel data |
CN111813849A (en) * | 2020-09-14 | 2020-10-23 | 杭州数梦工场科技有限公司 | Data extraction method, device and equipment and storage medium |
CN112307725B (en) * | 2020-10-30 | 2022-11-25 | 天津光电通信技术有限公司 | Method for adding table information on two-dimensional drawing interface |
CN115329730A (en) * | 2022-07-11 | 2022-11-11 | 中国建筑西南设计研究院有限公司 | Spreadsheet operation management method suitable for graphic platform |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101404041A (en) * | 2008-09-24 | 2009-04-08 | 上海纳杰电气成套有限公司 | System diagram generation system |
CN105159685A (en) * | 2015-09-28 | 2015-12-16 | 武汉中冶易新科技有限公司 | Method for extracting detail content of computer aided design (CAD) drawing to Excel form |
CN105912516A (en) * | 2016-04-01 | 2016-08-31 | 南京朗坤软件有限公司 | Method for one-lick extraction of table data from AutoCAD file |
CN108763382A (en) * | 2018-05-18 | 2018-11-06 | 中铁山桥集团有限公司 | A method of the chart content in CAD program is imported into Excel programs |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7818661B2 (en) * | 2006-10-04 | 2010-10-19 | Dilip Patel | Method and system for automatically generating template based spreadsheet pivot tables |
-
2019
- 2019-03-12 CN CN201910186498.8A patent/CN109933765B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101404041A (en) * | 2008-09-24 | 2009-04-08 | 上海纳杰电气成套有限公司 | System diagram generation system |
CN105159685A (en) * | 2015-09-28 | 2015-12-16 | 武汉中冶易新科技有限公司 | Method for extracting detail content of computer aided design (CAD) drawing to Excel form |
CN105912516A (en) * | 2016-04-01 | 2016-08-31 | 南京朗坤软件有限公司 | Method for one-lick extraction of table data from AutoCAD file |
CN108763382A (en) * | 2018-05-18 | 2018-11-06 | 中铁山桥集团有限公司 | A method of the chart content in CAD program is imported into Excel programs |
Non-Patent Citations (3)
Title |
---|
AutoCAD二次开发在土工试验中的应用;胡建平;《水运工程》;20110425(第04期);全文 * |
Excel表格到AutoCAD表格的转换;冯若谦等;《宁夏工程技术》;20030315(第01期);全文 * |
基于AutoLISP的AutoCAD与Excel数据交换的二次开发程序设计;马晓明等;《现代制造技术与装备》;20170715(第07期);第10-12页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109933765A (en) | 2019-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109933765B (en) | Method for extracting Excel table content to CAD table | |
TWI529551B (en) | Method and system for implementing graphically editable parameterized cells | |
CN103454972B (en) | Based on the method for the cutter five-shaft numerical control grinding automated programming of UG NX API | |
CN110096033A (en) | A method of check and correction numerical control program precision | |
CN107368621B (en) | Method for generating CAD format two-dimensional standard three-view by three-dimensional support model in PDMS | |
CN111611766A (en) | Method, apparatus and storage medium for determining circuit layout constraints | |
CN116851930B (en) | Three-dimensional five-axis curved surface laser cutting track generation method and device | |
CN109145359B (en) | Steel structure material preparation method based on BIM system and CAD software | |
US6920620B2 (en) | Method and system for creating test component layouts | |
CN111103848A (en) | Method and system for compiling numerical control program for machining insertion groove of final blade of steam turbine rotor | |
CN108038255A (en) | A kind of automatic method for making pcb board set jigsaw | |
KR20070097231A (en) | Automatic design method with ms excel | |
CN110826185B (en) | Method for establishing secondary development bearing part library based on CAD | |
CN104408267A (en) | Finite element modeling method for special-shaped spatial structure | |
CN117195356A (en) | BIM-based method for automatically outputting blank sheets of pseudo-classic architecture wood members | |
CN115203805B (en) | BIM technology-based air duct model generation method, device and readable medium | |
CN107229687B (en) | Dft file is converted to the system and method for DWG file by a kind of batch | |
CN112307725B (en) | Method for adding table information on two-dimensional drawing interface | |
CN110889214A (en) | Rule-based CAD drawing automatic error detection method | |
CN107240150A (en) | A kind of three-dimensional tube numeral dissolves drawing method | |
Abd Rahman et al. | Integrated Interface System of STEP Data Models for the Tool Path Generation | |
CN115221841B (en) | WEB-based engineering symbol processing method | |
CN104678898A (en) | Automatic programming system for movement track of ball slice cutting robot based on CAD (computer-aided design) | |
CN115390853B (en) | Structured analysis method, system, terminal and storage medium for multi-source process file | |
JP2001067386A (en) | Design device, drawing production method and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |