Excel VBA Code to transfer excel namedrange to AutoCAD table

Excel VBA Code to transfer excel namedrange to AutoCAD table

Anonymous
Not applicable
1,428 Views
0 Replies
Message 1 of 1

Excel VBA Code to transfer excel namedrange to AutoCAD table

Anonymous
Not applicable

Hi there,

Can anyone please help me with the following:

 

Here is what I am trying to accomplish:

I have a master Excel file with multiple sheets and tables to be imported into AutoCAD drawing. I am using DATALINK feature with the links to named ranges in excel. I was able to successfully link the tables but its giving me some issues with fomatting, it keeps changing the column and row widths. Its also taking very long time to modify or update the datalinks. I tried several options such as creating table and cell styles, using same format as Excel with fixed column widths in Excel and forcing to use Excel formatting, it works fine in some cases but not always, in such cases I have to go to each column and manually change the widths to what I needed to keep it consistent.

I was wondering if there is an efficient way of transferring the named ranges directly from Excel to AutoCAD table instead of using DATALINK feature.

 

I am maintaining the same name between Excel named ranges and the layout name in autocad assuming I will be able to open AutoCAD drawing, match the layout name with named ranges, copy the matching named range into corresponding layout sheet with top left corner at a fixed position, change the text style, column widths and row widths.

I am familiar with writing VBA codes in Excel, but not familiar with AutoCAD object model.

Any help will be greatly appreciated. Thanks alot in advance.

Please let me know if more clarification is needed on what I am going after.

Regards,

Kon

0 Likes
1,429 Views
0 Replies
Replies (0)