CN109933765B - A Method of Extracting Excel Table Contents to CAD Table - Google Patents
A Method of Extracting Excel Table Contents 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
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 9
- 230000000007 visual effect Effects 0.000 claims abstract description 8
- 239000000284 extract Substances 0.000 claims description 9
- 238000012986 modification Methods 0.000 claims 1
- 230000004048 modification Effects 0.000 claims 1
- 238000011161 development Methods 0.000 abstract description 7
- 238000013461 design Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011960 computer-aided design Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及AutoCAD二次开发领域,尤其涉及一种提取Excel表格内容至CAD表格的方法。The invention relates to the field of secondary development of AutoCAD, in particular to a method for extracting the content of an Excel form to a CAD form.
背景技术Background technique
AutoCAD(Autodesk Computer Aided Design)是Autodesk(欧特克)公司于1982年开发的计算机辅助绘图软件,用于二维图绘制、详细绘制、设计文档和基本三维设计,现已成为国际上广为流行的绘图工具。AutoCAD具有良好的用户界面,通过交互菜单或命令方式便可以进行各种操作。AutoCAD (Autodesk Computer Aided Design) is a computer-aided drawing software developed by Autodesk (Autodesk) in 1982. It is used for two-dimensional drawing, detailed drawing, design documentation and basic three-dimensional design. It has become widely popular internationally. drawing tools. AutoCAD has a good user interface, and various operations can be performed through interactive menus or commands.
工程中,由于图纸的多样性,经常需要将Excel表格中的内容复制到AutoCAD表格中,用手动复制数据的方式不仅效率低,而且很容易出错,因此,如何高效、准确的提取Excel表格中的数据到CAD图纸中显得极为重要。In engineering, due to the diversity of drawings, it is often necessary to copy the contents of the Excel table to the AutoCAD table. Manually copying data is not only inefficient, but also prone to errors. Therefore, how to efficiently and accurately extract the contents of the Excel table Data into CAD drawings is extremely important.
鉴于此,本专利提供一种提取Excel表格内容至CAD表格的方法,以解决上述问题。In view of this, this patent provides a method for extracting the content of an Excel table to a CAD table to solve the above problems.
发明内容Contents of the invention
本发明的目的是为了克服现有技术缺陷,而提供一种从Excel表格内容有选择的提取至CAD表格的方法。对CAD程序的二次开发方法简单快捷,经过二次开发的CAD程序对Excel表数据进行快捷运算加工,一次性形成所需要的CAD一个或者多个表格,提高了工作效率和表格的准确性。The purpose of the present invention is to provide a method for selectively extracting the contents of an Excel table to a CAD table in order to overcome the defects of the prior art. The secondary development method of the CAD program is simple and fast. After the secondary development of the CAD program, the Excel table data is quickly processed and processed, and one or more CAD tables are formed at one time, which improves the work efficiency and the accuracy of the table.
为了达到上述目的,本发明采用以下技术方案实现:In order to achieve the above object, the present invention adopts the following technical solutions to realize:
一种从Excel表格内容有选择的提取至CAD表格的方法,该方法利用Visual LISP模块对CAD程序进行二次开发,使得CAD程序执行以下处理:判断需要读取数据的Excel表格数据及格式的正确性,对Excel存有数据的单元格进行批量读取并特定运算加工,将程序结果按特定文本格式、特定坐标写入CAD模板文件的表格中。A method for selectively extracting the content of an Excel table to a CAD table, the method uses the Visual LISP module to carry out secondary development of the CAD program, so that the CAD program performs the following processing: judging the correctness of the data and format of the Excel table that needs to be read It can batch read the cells with data stored in Excel and perform specific calculation processing, and write the program results into the table of the CAD template file in a specific text format and specific coordinates.
一种从Excel表格内容有选择的提取至CAD表格的方法,前提条件是CAD软件已经安装Visual LISP模块,该方法的具体步骤是:A method for selectively extracting the content of an Excel table to a CAD table, the prerequisite is that the CAD software has installed the Visual LISP module, and the specific steps of the method are:
1)准备需要提取数据的Excel文件,其特征在于Excel表头各项内容固定,单元格内容及格式符合程序要求;1) Prepare an Excel file that needs to extract data, which is characterized in that the contents of the Excel header are fixed, and the cell content and format meet the program requirements;
2)在CAD程序中绘制出目标表格模板,表格的左下点定义为坐标(0,0),将模板文件命名为“提取Excel内容.dwg”;2) Draw the target form template in the CAD program, define the lower left point of the form as coordinates (0, 0), and name the template file "Extract Excel content.dwg";
3)打开CAD软件,在Visual LISP编辑器中编写程序,插入窗体,窗体过程的功能是显示窗体,并在窗体中输入适当的数据及信息;程序再对Excel表读取后的数据以及窗体中的数据及信息进行自动运算加工。程序完成后,编译并保存为*.vlx,然后将其复制到CAD程序的支持路径下;3) Open the CAD software, write the program in the Visual LISP editor, insert the form, the function of the form process is to display the form, and input appropriate data and information in the form; the program then reads the Excel table The data and the data and information in the form are automatically processed. After the program is completed, compile and save it as *.vlx, and then copy it to the support path of the CAD program;
4)在CAD软件中添加命令按钮“提取Excel表格”,并将该命令指向步骤3)中的程序过程;4) Add a command button "extracting an Excel table" in the CAD software, and point this command to the program process in step 3);
5)在CAD窗口中点击按钮“提取Excel表格”,弹出步骤3)中窗体,在窗体中输入适当的数据和信息,程序自动将读取Excel后的数据和信息进行后台自动运算加工,并按程序设置的坐标点在CAD中形成所需要的表格。5) Click the button "Extract Excel Table" in the CAD window, and the form in step 3) will pop up, and enter appropriate data and information in the form, and the program will automatically process the data and information after reading Excel in the background, And form the required form in CAD according to the coordinate points set by the program.
如上所述的提取Excel表格内容至CAD表格的方法,其特征在于,读取Excel表格的特定单元格,经程序按所需的方式对数据进行运算加工,并将结果写入CAD表格的指定位置。The method for extracting the content of the Excel form to the CAD form as described above is characterized in that the specific cells of the Excel form are read, the data is calculated and processed according to the required method through the program, and the result is written into the designated position of the CAD form .
本发明的有益效果是:The beneficial effects of the present invention are:
由于采用上述技术方案,本发明提取Excel表格内容至CAD表格的方法具有积极效果,对比手动的提取方式,程序自动读取Excel表格内容,一次性形成所需要的CAD一个或者多个表格,提高了工作效率和表格的准确性。Due to the adoption of the above-mentioned technical scheme, the method for extracting the content of the Excel form to the CAD form in the present invention has a positive effect. Compared with the manual extraction method, the program automatically reads the content of the Excel form, and forms one or more forms of CAD required at one time, which improves the efficiency of the CAD form. Productivity and accuracy of forms.
附图说明Description of drawings
图1是本发明一种提取Excel表格内容至CAD表格的方法流程图;Fig. 1 is a kind of flow chart of the method for extracting Excel form content to CAD form of the present invention;
图2是本发明一种提取Excel表格内容至CAD表格的方法中插入窗体的功能及数据示例图。Fig. 2 is a function and data example diagram of inserting a form in a method for extracting the content of an Excel form to a CAD form according to the present invention.
具体实施方式Detailed ways
下面结合本发明实施例中的附图,对本发明方法中的技术方案进行清楚、完整的描述,显然,所描述的方法仅仅是本发明一部分技术方案,而不是全部的技术方案。任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,根据本发明的技术方案及其发明构思加以等同替换或改变,都应涵盖在本发明的保护范围之内。The following is a clear and complete description of the technical solutions in the method of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described method is only a part of the technical solutions of the present invention, not all technical solutions. Anyone familiar with the technical field within the technical scope disclosed in the present invention, according to the technical scheme of the present invention and its inventive concepts to make equivalent replacements or changes shall be covered within the scope of protection of the present invention.
如图1所示,本发明提取Excel表格内容至CAD表格的方法,在已安装Visual LISP模块的前提下,该方法的具体步骤是:As shown in Figure 1, the present invention extracts the method for Excel form content to CAD form, under the premise that Visual LISP module has been installed, the concrete steps of this method are:
1)准备需要提取数据的Excel文件,其特征在于Excel表头各项内容固定,单元格内容及格式符合程序要求;1) Prepare an Excel file that needs to extract data, which is characterized in that the contents of the Excel header are fixed, and the cell content and format meet the program requirements;
2)在CAD程序中绘制出目标表格模板,表格的左下点定义为坐标(0,0),将模板文件命名为“提取Excel内容.dwg”,对于同类型图纸,无需每次新建此模板文件;2) Draw the target table template in the CAD program, define the lower left point of the table as coordinates (0, 0), and name the template file "Extract Excel content.dwg". For the same type of drawings, it is not necessary to create this template file every time ;
3)打开CAD软件,在Visual LISP编辑器中编写程序,程序插入窗体,如图2所示,窗体过程的功能是显示窗体,并在窗体中输入适当的数据及信息;程序再对Excel表读取后的数据以及窗体中的数据及信息进行自动运算加工。并按步骤2)的CAD模板文件中的表格进行坐标定位,将Excel原数据和经过加工运算后的结果写入特定坐标;程序完成后,编译并保存为*.vlx(例如:acre.vlx,acre为用户自行设置),然后将其复制到CAD程序的支持路径下;3) Open the CAD software, write the program in the Visual LISP editor, and the program is inserted into the form, as shown in Figure 2, the function of the form process is to display the form, and input appropriate data and information in the form; Perform automatic calculation and processing on the data read from the Excel table and the data and information in the form. And perform coordinate positioning according to the table in the CAD template file in step 2), and write the Excel original data and the result after processing operation into specific coordinates; after the program is completed, compile and save it as *.vlx (for example: acre.vlx, acre is set by the user), and then copied to the support path of the CAD program;
4)在CAD软件中添加命令按钮“提取Excel表格”,并将该命令指向步骤3)中的程序过程;命令按钮创建好后,以后可以重复使用;4) Add a command button "extract Excel table" in the CAD software, and point the command to the program process in step 3); after the command button is created, it can be reused later;
5)在CAD窗口中点击按钮“提取Excel表格”,弹出步骤3)中窗体,在窗体中输入适当的数据和信息,程序自动将读取Excel后的数据和信息进行后台自动运算加工,如果Excel表格的内容及格式不符合程序要求,弹出程序错误说明,并返回步骤1)修改Excel表格;如果Excel表格的内容及格式正确,程序自动将Excel原数据和经过加工运算后的结果写入步骤2)中创建的CAD模板文件中的特定坐标,在CAD中形成所需要的表格。5) Click the button "Extract Excel Table" in the CAD window, and the form in step 3) will pop up, and enter appropriate data and information in the form, and the program will automatically process the data and information after reading Excel in the background, If the content and format of the Excel table do not meet the program requirements, a program error description will pop up, and return to step 1) to modify the Excel table; if the content and format of the Excel table are correct, the program will automatically write the original data of Excel and the result after processing and calculation The specific coordinates in the CAD template file created in step 2) form the required table in CAD.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910186498.8A CN109933765B (en) | 2019-03-12 | 2019-03-12 | A Method of Extracting Excel Table Contents to CAD Table |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910186498.8A CN109933765B (en) | 2019-03-12 | 2019-03-12 | A Method of Extracting Excel Table Contents 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 | A Method of Extracting Excel Table Contents to CAD Table |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109933765B (en) |
Families Citing this family (7)
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 device, and storage medium |
CN112307725B (en) * | 2020-10-30 | 2022-11-25 | 天津光电通信技术有限公司 | Method for adding table information on two-dimensional drawing interface |
CN114792017A (en) * | 2022-03-25 | 2022-07-26 | 中船黄埔文冲船舶有限公司 | Typesetting method of CAD character string |
CN114662177A (en) * | 2022-04-19 | 2022-06-24 | 沛顿科技(深圳)有限公司 | CAD LISP and EXCEL collaborative design method |
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) | A Method of Extracting Excel Table Contents to CAD Table | |
CN107480380B (en) | A kind of engineering drawing generation method based on template | |
CN103454972B (en) | Based on the method for the cutter five-shaft numerical control grinding automated programming of UG NX API | |
CN113094784B (en) | Adjacent complex underground engineering parametric modeling method based on building information model | |
CN112099774B (en) | A quantum cloud platform front-end development method | |
CN111103848A (en) | Method and system for compiling numerical control program for machining insertion groove of final blade of steam turbine rotor | |
US6920620B2 (en) | Method and system for creating test component layouts | |
WO2025107330A1 (en) | Method for using large language model to automatically generate map annotations on basis of text | |
CN109145359B (en) | Steel structure material preparation method based on BIM system and CAD software | |
CN114816381A (en) | Construction engineering MBD three-dimensional labeling method, electronic equipment and storage medium | |
CN106650091B (en) | A method for extracting the connection relationship of components in indoor distribution drawings based on AutoCAD platform | |
CN101458726A (en) | Wire cutting program generating system and method | |
CN107220439A (en) | A kind of method for moving assembling layer word in PCB design in batches | |
CN114491720B (en) | Method and device for generating detailed steel structure diagram, electronic equipment and storage medium | |
CN110826185A (en) | Method for establishing bearing part library based on CAD secondary development | |
CN110889214A (en) | A Rule-based Automatic Error Checking Method for CAD Drawings | |
CN112307725B (en) | Method for adding table information on two-dimensional drawing interface | |
CN108875153A (en) | A kind of text engraving method based on CATIA three-dimensional geological model | |
CN106528946A (en) | Method for inserting AutoCAD graph blocks in batches | |
CN103077284B (en) | Generic text template is utilized automatically to generate the method and system of auxiliary code file | |
CN115032948A (en) | H-shaped steel cutting off-line programming system based on development diagram | |
CN105718672A (en) | CAD target selection method | |
CN114816156B (en) | Model detection method, device, terminal device and storage medium | |
TWM598440U (en) | Standard operation procedure upgrade programming engine system | |
CN116451480A (en) | Quick repair method, application and computer program product for two-dimensional geometric model of tire |
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 |