AutoCAD VBA to insert blocks by getting coordinates (Columns B and C) and block names (Column A) from excel

AutoCAD VBA to insert blocks by getting coordinates (Columns B and C) and block names (Column A) from excel

varunshankarsip
Community Visitor Community Visitor
446 Views
1 Reply
Message 1 of 2

AutoCAD VBA to insert blocks by getting coordinates (Columns B and C) and block names (Column A) from excel

varunshankarsip
Community Visitor
Community Visitor

Hi all. I am new to this forum. I am currently working on a drawing that has a lot of blocks to be placed at specific coordinates that are listed in an excel file. I also have the block names procided in  Column A of the excel sheet. With the X coordinate in COlumn B and Y coordinate in Column C, can someone help me generate an autocad vba code to place these blocks at their respective coordintes in my active drawing?

0 Likes
447 Views
1 Reply
Reply (1)
Message 2 of 2

Ed__Jobe
Mentor
Mentor

You can simply use a For..Each loop to iterate the rows in your spreadsheet and using the InsertBlock method. There's tons of code samples in this forum for working with Excel. Just do a search.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes