Datalink to Excel does not update using AutoCAD Fields

Datalink to Excel does not update using AutoCAD Fields

jmorrow
Explorer Explorer
7,415 Views
6 Replies
Message 1 of 7

Datalink to Excel does not update using AutoCAD Fields

jmorrow
Explorer
Explorer

I have an excel file and autoCAD file that I have successfully created a datalink between.  In the AutoCAD file, I inserted Object Fields into the Table that report the area of four closed polylines in the drawing.  When I first inserted the fields and Upload User Changes To Source File, it works perfectly.  But, if I move a polyline vertex to change the area, and the Regen, the field updates to the new number, but when I Upload User Changes To Source File, it does not update the Excel file.  It says the link was written successfully, but the old value is still in the Excel file.  Is there a setting that I'm missing?

 

My files are attached.  Thanks.

0 Likes
Accepted solutions (1)
7,416 Views
6 Replies
Replies (6)
Message 2 of 7

natasha.l
Alumni
Alumni

Hello @jmorrow

 

You have several options when it comes to updating data table information. Make sure when you make changes in AutoCAD the excel file is not open. Make sure to Save & Close the excel file while working in AutoCAD. 

 

  1. Manually update by right-clicking the table then selecting Data Extraction > Update Data Extraction.
  2. Set auto updates for Data Extraction tables/file the the DXEVAL system variable 

Please "Accept Solution" if a reply or replies have helped resolve the issue or answered your question, to help others in the community.

0 Likes
Message 3 of 7

jmorrow
Explorer
Explorer

Hi Natasha -

 

Thanks for the response.  I do have the Excel file closed when trying to write out the changes.  So, I don't think that is the problem.  Also, from reading the on-line documentation for DXEVAL, it looks like that system variable only sets when the system will notify you that an update is needed, not that it will automatically update (unless I'm reading the documentation in the link you provided incorrectly).

 

So, when I right click within my table, and I select Data Link, and then select Upload User Changes to Source File, I get the message:

1 object(s) found.
1 data link(s) could not be written out.
0 data link(s) written out successfully.

 

If I change one item in the Table, for example, I have a text entry of "test3" in the 5th cell down from the top, and this is the only change I make, and then go through the exact same process, I get the following message:

1 object(s) found.
1 data link(s) written out successfully.

 

BUT, if I now open the Excel file, the text is changed in that one cell, but the field values in the table are not written out.  In other words, the second field from the top in the Area column is 1277.6 in the Table, but in the Excel spreadsheet it is 1140.2.  So, for some reason, AutoCAD does not update the field values in the Excel spreadsheet.  There seems to be a bug in the software.  Or else there is some setting that I am missing.  Any assistance would be greatly appreciated.

 

Thanks

 

0 Likes
Message 4 of 7

natasha.l
Alumni
Alumni

Hello @jmorrow

 

When editing the table within AutoCAD keep in mind the table will lock, you need to unlock the table to conduct "TABLEEDIT" to edit a cell. Once you do this you can then upload your changes to the linked file. 

 

  1. Unlock the Table unlocktable.png
  2. Select a cell & edit using TABLEEDIT mode
  3. Select the cell again then "Upload User Changes to Source File" 
  4. UploadUserCh.pngResult.png

 

Please "Accept Solution" if a reply or replies have helped resolve the issue or answered your question, to help others in the community.

0 Likes
Message 5 of 7

jmorrow
Explorer
Explorer

Hi Natasha -

Thanks for the response.  The cells in the table that I uploaded are unlocked.  I tried unlocking the whole table, and I still get the same result.  In your screen shots you posted, I noticed two things:

 

1. The AutoCAD table in your post shows an area of 1140.2, which is the value in the Excel table.  The FIELD in the original AutoCAD drawing table that I posted had an area of 1277.6, which is the number I am trying to get AutoCAD to upload to Excel, but I'm not having any success.

2. It's hard to tell from the screen shot, but it LOOKS like the values in the AutoCAD table are now only text.  Not Fields.  It appears you updated the link FROM the excel file TO AutoCAD, which has overwritten what was in the AutoCAD table with the text values in the spreadsheet.  That means I no longer have fields in the table that will update as I change the size of the closed polylines.  If you go back to my orginal files I posted, you will see there are fields in the AutoCAD table that are referencing the area of the four closed polylines in the drawing.

 

What I want is to have AutoCAD write out the latest field values to the spreadsheet whenever I change the size of one or more of the closed polylines.

 

This appears to be a bug in the software that once you write a field out to an Excel spreadsheet, AutoCAD never recognizes that a change in the field value is a change, and therefore will not write out the latest field value to Excel.

0 Likes
Message 6 of 7

Anonymous
Not applicable
Accepted solution

I ran into the same issue and I think I may have found the problem. If the problem you have is the same, you will find that when you write something into a table cell the direct way (double click the cell and type) and then ”Update user changes to source file” the changes apply to excel, just the updated filed cells don't.

 

Therefore after you make your changes in the model (drawing), editing the polylines and update the changes to the Autocad table you will have to enter each of the filed cells (or just the ones that you modified) by double clicking them and then exiting. You do not need to write anything, just enter and exit the cell. After that you should be able to update the excel file successfully.

 

I think that the automatic update of the field through the ”REGEN” or ”REGENALL” command does not register as a change to the Autocad table, therefore it does not think that there is a modification and thus ignores it.

 

Hope this helps

Message 7 of 7

sbutler502
Advocate
Advocate

Well it doesn't work for me.

 

Plain text will transfer to Excel spreadsheet but field information does not.  And yes I clicked in each cell of the table, saved the dwg file, regenall, before writing datalinks to external source.

 

I guess something was "upgraded" in Civil3d 2024.

Disappointing.  Now I hand edit the spread sheet so I can send it to the client.