![]() be used for drawing contour lines in maps or for drawing process diagrams. In this post I will draw a simple polyline. I also created a simple line object in AutoCAD. I introduced zoom in AutoCAD, pan in AutoCAD, overlapping objects in AutoCAD and unit display settings in AutoCAD. However, it should also work in other Excel/AutoCAD versions.In a previous post I provided an introduction to basics in AutoCAD. The above code was successfully tested in Excel and AutoCAD 2010. If you have AutoCAD 2010 or newer, you will need to download the VBA module from Autodesk since from 2010, VBA is not installed with AutoCAD. If LastRow References => and enable Autocad 1234 Type Library, where 1234 depends on your AutoCAD version (i.e., 2010, 2011, 2012, etc.) you have installed on your computer. 'Go to Tools -> References -> Autocad 1234 Type Library, where 1234 depends 'In order to use the macro you must enable the AutoCAD library from VBA editor: 'Draws a polyline in AutoCAD using X and Y coordinates from sheet Coordinates. VBA code to draw a polyline in AutoCAD using early binding Although the example is quite simple, it illustrates the general idea of using VBA from Excel to draw objects in AutoCAD. I thought that the interaction between Excel and AutoCAD using VBA might be useful for all types of engineers using AutoCAD (primarily civil and surveying engineers), so I decided to post the VBA code here. I manage to fulfill his request by using a lightweight polyline, a 2D line consisting of straight and arched segments. He had a large Excel file with point coordinates (x, y), and he wanted to connect them through a polyline to create a 2D profile. A friend of mine, a surveying engineer, asked me recently if it is possible to draw a polyline in AutoCAD using coordinates from an Excel file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |