Creating a table in Autocad with data from Excel only by using macro/VBA

Creating a table in Autocad with data from Excel only by using macro/VBA

Anonymous
Not applicable
2,576 Views
4 Replies
Message 1 of 5

Creating a table in Autocad with data from Excel only by using macro/VBA

Anonymous
Not applicable
Hello, Being quite new to Autocad, I'm encountering some problems while working. My goal, to put it simply, is to retrieve data from an Excel sheet and then display it within a table in Autocad. The thing is, I want it to done only by using macros/VBA. So I wanted to know if it was possible to use a macro in Autocad to retrieve the data from Excel and then to display it in a table. Thank you your help.
0 Likes
2,577 Views
4 Replies
Replies (4)
Message 2 of 5

RobDraw
Mentor
Mentor

Why not use a data link and create an AutoCAD table?


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 3 of 5

Anonymous
Not applicable
It's true I could do that. The thing is, I want to get the data only by using macros, without using the data link mannualy in the menu. For the finale table, I do not really mind if it's an excel or an AutoCAD one. I don't know if I'm really clear in what I am asking (Sorry). Thank you for taking the time to answer.
0 Likes
Message 4 of 5

RobDraw
Mentor
Mentor

@Anonymous wrote:
It's true I could do that. The thing is, I want to get the data only by using macros, without using the data link mannualy in the menu. For the finale table, I do not really mind if it's an excel or an AutoCAD one. I don't know if I'm really clear in what I am asking (Sorry). Thank you for taking the time to answer.

You are not clear. A data link is not manual. It a live link and can be two way communication.

 

Maybe you could describe what you have and where you want to go with it.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 5 of 5

Anonymous
Not applicable
You're right I should describe in details. I have a massive table in an Excel file. I want the user of AutoCAD to type a keyword (like the name of an object) in an UserForm. I want AutoCAD to open the Excel file, look for the right row with that keyword and then send back the data (the entire row) to AutoCAD. The data it received must now being displayed in a table. I don't want to use the data as attributes for object, I just want it in a table within AutoCAD. Currently, after working on my side, I can already Use AutoCAD to open Excel, search for the right row and copying it in a new Table. All I need now is to know how to send that table to AutoCAD and how to display it with a macro. Thank you for taking your time.
0 Likes