Import Excel data to a Text Field

Import Excel data to a Text Field

James.AlexanderLYJUP
Participant Participant
6,580 Views
9 Replies
Message 1 of 10

Import Excel data to a Text Field

James.AlexanderLYJUP
Participant
Participant

Is there a way to import data from an Excel spreadsheet directly to a text field? Im not a strong Excel user. I dont need to import an entire spreadsheet just certain cell data. Im trying to populate title block information from a spreadsheet instead of using SSM. We are using BIM360 and cant get it to play nicely with SSM. Another problem for another day. SO I thought what if I built my title block with attributed text using fields linked to an excel file to populate things like Drawn By, Chkd By, Title 1, Title 2, etc.. I have not found a way to do that. 

 

The goal is to make all updates through the spreadsheet then have it automatically update each sheet within the fields. Any help or suggestions would be greatly appreciated. Thank you.

0 Likes
6,581 Views
9 Replies
Replies (9)
Message 2 of 10

quochiep1509
Observer
Observer

I believe Table function of Autocad already have it.  I'm using Autocad 2020.

Steps:

- Go to Table function (in Home/Annotation tab)

- Create new table

- Choose a data link (which file you want and which cell you want)

- After finish, if you want to update the table, just choose the table in autocad, right click, select Datalink, and choose "download changes from the source files", and in reverse, you could "upload changes to the source file" to change the excel data from Cad drawing.

The sad thing is that it see, we can not update data for multiple tables at the same time.

 

Message 3 of 10

James.AlexanderLYJUP
Participant
Participant
Thank you for your response but I do not want to import the entire spreadsheet as a table or data link. I want to import data only from specific cells within the spreadsheet to an attributed text field.
0 Likes
Message 4 of 10

quochiep1509
Observer
Observer
Yes, the table allow import some specific cells, not all table.
0 Likes
Message 5 of 10

dbroad
Mentor
Mentor

There may be several solutions depending on your open mindedness and skill:

1)Use datalink as describe above and then use fields to access the cells within those tables.  The datalink tables could be on a layer that is non-plottable and off.  This requires the least expertise.

2)Create fields that access dwgprops. Create an AutoLISP program to be invoked on open via startup suite and perhaps during a plot event that would access specific cell values from the Excel and that would set the dwgprops (standard or custom).  Requires immense expertise and ability to program with an understanding of LISP and VBA. 

-The program would need to 1)determine if the excel workbook exists, 2)create and excel object, 3)open the workbook, 4)use the application and workbook object properties to get the values from specific cells, 5)update or create values in the SummaryInfo of the activedocument, and 6)release all the activeX objects created.

 

As for me, I can't see the advantage of using Excel to maintain items that can easily be maintained with dwgprops or by using attedit. Such a program as above could be easily broken by someone editing a spreadsheet that adds a row or column unless the program was made even more complex.

Architect, Registered NC, VA, SC, & GA.
Message 6 of 10

James.AlexanderLYJUP
Participant
Participant
Thank you for your response. Using option #1, how would I "use fields to access the cells within those tables"? I have some understanding of how to use fields from drawing properties but how would I write a custom field that would pull the data from a specific cell within the data linked table? Would you be able to provide a specific example of the logic? For example if my table contained the drawing title that I wanted to insert into my title block or the revision number?
I'm trying to figure out a way to automate the title blocks on a project without using SSM. The idea is to be able to open an excel file and make all the edits there then have it populate the title blocks automatically. Preferably without using lisp routines which I don't have experience with.
Again thank you for your help.
0 Likes
Message 7 of 10

maratovich
Advisor
Advisor

I think you better use search and replace.
If you have data in a block with attributes, then this is better.
Select many files and start automatic replacement in all.

 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 8 of 10

James.AlexanderLYJUP
Participant
Participant
Thank you but I want to automate the process much like using SSM but with an Excel file instead.
0 Likes
Message 9 of 10

dbroad
Mentor
Mentor

Sorry.  I'd forgotten that Autodesk programmers dropped the ball in supporting getting table cell values that are text as opposed to numbers.  

A third option would cost something. Check out the AutoField third party app.

https://apps.autodesk.com/ACD/en/Detail/Index?id=2045112649967645682&appLang=en&os=Win64

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 10 of 10

JTBWorld
Advisor
Advisor

See JTB Excel2TextField

This CAD app lets you connect fields to Excel cell values. You can place fields in texts, mtexts, tables and/or block attributes.


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes