![]() The sample workbook that you will find in the Downloads section below requires three main user inputs (as the AddText method), as well as four optional: the coordinates of the insertion point (in X, Y, Z) – in other words, where you want the newly created text to be inserted, the text height (like font size) and the text message that should be displayed in the drawing. The 3D WCS coordinates on the drawing where the text is placed. InsertionPoint: Variant (three-element array of doubles) input-only. Object: ModelSpace Collection, PaperSpace Collection, Block – the objects this method applies to. RetVal = object.AddText(TextString, InsertionPoint, Height) According to AutoCAD VBA help, the structure of this method is the following: The code might be extremely useful for filling the information in a drawing legend (watch the demonstration video for example). So, below you will find a VBA code that will help you “send” text strings from Excel to a specific location in an AutoCAD drawing. Since I received several email requests from various blog readers, I decided to continue the subject of AutoCAD automation from Excel. The previous week I published a VBA code for drawing circles in AutoCAD using data from an Excel workbook.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |