Sum Table Column

Sum Table Column

ArchD
Collaborator Collaborator
9,883 Views
10 Replies
Message 1 of 11

Sum Table Column

ArchD
Collaborator
Collaborator

Is there a way to sum a table column instead of just a table range? Excel allows you to use =SUM(B:B) to get a sum of all in the B column. This doesn't work in AutoCAD. Is there another way to do so without doing a data link to an Excel file?

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
0 Likes
Accepted solutions (1)
9,884 Views
10 Replies
Replies (10)
Message 2 of 11

Otto
Alumni
Alumni
Hello ArchD

It looks like you are looking for information related to datalinking between AutoCAD and Excel. Community members with similar questions found the following article(s) useful:

DATALINK (Command)

To update data links, use the DATALINKUPDATE (Command)

To provide an interface to external database tables use:DBCONNECT (Command).


I'm a software-based HelpBot, designed to provide the information you need to get up and running with Autodesk products—any time, day or night. Your feedback will help train me to deliver more accurate and helpful answers. Thanks in advance! Also, please note that I'm only set up to respond to the first post of a topic, not to any replies. Thank you!

Helpful links: Find Serial Numbers and Product Keys | Find Downloads and Service Packs | Activate Autodesk software
0 Likes
Message 3 of 11

ArchD
Collaborator
Collaborator

I guess I was too vague in my issue for Replybot to be effective.

 

My goal is to monitor blocks with attributes in my drawing. When the attributes change or blocks are added or removed, I need to make a total count of the attribute values. I can do this using Data Extraction and a table dropped into the drawing just fine if the number of blocks do not change. If I add or subtract blocks the range of the sum does not add up correctly. 

 

If I use Data Extraction and send it to an Excel file, I have more issues because the Excel file that AutoCAD extracts to will not let me do a sum of a column unless I convert the values to number. It seems that there is some sort of error that shows the number, but does not allow formula evaluation on them. The other issue I have with the Excel file is that if I add or remove blocks, I have to output a new data extraction and I would have to recreate a sum of the column every time.

 

Here is a screen cast of my issue

 

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
0 Likes
Message 4 of 11

ВeekeeCZ
Consultant
Consultant
Just an untested idea - have you tried to add Number of Rows (object>selectt table>rows) as a part of the range definition?
0 Likes
Message 5 of 11

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

how about adding a summary footer into the table, defined directly during the _DATAEXTRACTION command (right-click into the column header to get the option)?

 

20170515_221945.png

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 6 of 11

ArchD
Collaborator
Collaborator

That is pretty cool, I'm sure I'll find a use for that at some point. If I could get that as a header instead of a footer I would be able to link MText to the cell and have it update automatically. As a footer it jumps around if I add or subtract a block. 

 

This information will be used in a block of text for reports and other notes, but I'm lazy and would like to dynamically link the info into the text instead of typing it each time. Also it eliminates user error if I can get it to work correctly.

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
0 Likes
Message 7 of 11

Ranjit_Singh
Advisor
Advisor

Look into reactors.

Message 8 of 11

ВeekeeCZ
Consultant
Consultant
Accepted solution

Ok, no feedback from you - guess you did not get what I've meant. So HERE is the screencast to see how it could be done. And yes, it works.

 

Even if you can add one step to add another formula in between if your end of a range is less than the number of rows.

 

Message 9 of 11

parkr4st
Advisor
Advisor

with C3D have you considered using the GIS functionality?

 

after edits and check in, the bottom of the data table has the message   Row     of xxxx. all built into your software.

 

dave

Message 10 of 11

ArchD
Collaborator
Collaborator

The Field within a Field works great. This will work for now, thanks! The screencast helped out a ton.

 

I really like the idea of the Reactor and I am going to look into this to create a lisp that passively watches these blocks and has a command to drop in a block of text that is formatted the way we need and updates dynamically.

 

I like the GIS idea, but I would like to create this as a solution for everyone at the office, even if they use basic AutoCAD.

 

Awesome feedback on this topic, thanks everyone!

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
0 Likes
Message 11 of 11

Anonymous
Not applicable

Hello!

I clicked several times on the cell where the sum should come up until a text entry bar appeared. Then Field, in Field names chose Formula, then Sum, then you need to select the first corner of the cell range as it's said down in command line, then select the second corner of the table range and Ok.

0 Likes