Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Sum Attribute Values with Data Extraction

Anonymous

Sum Attribute Values with Data Extraction

Anonymous
No aplicable

Is there a way to get the values from an attribute to total using Data Extraction?


I have a symbol that has a Plant ID as one attribute and a Quantity as another attribute.  When I use DE, it give me individual rows for each because the totals aren't identical.

 

 

0 Me gusta
Responder
2.969 Vistas
11 Respuestas
Respuestas (11)

TheCADnoob
Mentor
Mentor

If you open the data in a spreadsheet application often there are very simple summing functions within these spread sheets. are these not an option or am i misunderstanding the problem?

CADnoob

EESignature

0 Me gusta

Anonymous
No aplicable

I have a label block that has a plant id and a quantity, see attachement.  I will have many of the same type plant with different counts for each bed.  

 

Using data extraction, I can link the plant id column with an external excel spreadsheet that will combine the additional information for the table (common name, botanical name, etc.).  This will allow me to have a dynamic table.

 

However, because the quantity values are different for each label, it wants to give me a row for each different quanity.  I wanted to have a all similar plant id's with the quantity totalled.  Don't think it's possible.

 

Thanks for your help.

 

0 Me gusta

john.vellek
Alumni
Alumni

Hi jlightell,

 

In the data extraction you can combine identical rows (see screenshot) but I don't think that is what you want. If you are linking to excel, take the rows of the same item and hide them after you build a summary row for them. You would see the totals and just hide the details - does that work for your problem?

 

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Me gusta

Anonymous
No aplicable

It doesn't actually solve the problem.  See the attachment, FYI, I have used the Sym column to sync with an external spreadsheet.

 

You will notice that the quantity for BRO and XAN are separated.  I would like it to combine them, giving me a 7 and 145 count, respectively.  Also, the POM items are combined because they are identical, but I want it to read 28 not 14.

 

 

0 Me gusta

john.vellek
Alumni
Alumni

Capture.PNGHi jlightell,

 

Could you attach your drawing so I can play with it a bit to see if I can come up with something to match your desired outcome?

 

I redefined your block in this instance to include all of the fields. By displaying the Count column in the table during extraction I was able to then do some math at the end to get subtotals of each row's quantity. From there it might make sense to export to Excel. Does this help? The way I have done it could also be used to calc the individual area totals as well.

 

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Me gusta

Anonymous
No aplicable

Thanks John for your work on this.  It appears you are taking the same work-arounds I did to produce something that is close to what it should do.


Your suggestion may work, however, you would have to put in all the data for each plant for every label.  It would be much preferred to be able to change the plant ID and by the way of the external link, containing the master list of plants, be able to fill in the table.

 

I've attached a sample drawing and excel spreadsheet you can use to play around with.

 

Thanks.

 

0 Me gusta

john.vellek
Alumni
Alumni

Hi jlightell,

 

Yes, it is not a perfect scenario but I am a firm believer in copy and paste to keep it simple at times. I can't tell you the number of times my staff (in the past) would find one way or another to break the data links. That is why I learned to KISS (keep it Simple Stupid).  I hope my example gets you closer to your goal. Let me know if I can provide any additional input or assistance.

 

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Me gusta

3wood
Advisor
Advisor

It is quite easy to get subtotal in Excel. Then you can copy and paste the Excel content into AutoCAD.

 

Step 1. Select the content including the title row and then "Data -> Subtotal"

sub2.JPG

 

Step 2, Change settings as you like

Sub3.JPG

 

Step 3, Get the Subtotal.
Sub4.JPG

0 Me gusta

Anonymous
No aplicable

Yeah, I got that.  I understand there are many work-arounds to get a similar results.  But I think we can all agree, this seems like a simple task that AutoCAD should be able to do without relying on an external software to do it.  

 

The benefit, of course, to having it stay within ACAD is the ability to have the table remain dynamic.  

john.vellek
Alumni
Alumni

Good morning jlightell,

 

While I agree that it would be nice to have more robust integrated spreadsheet capabilities, I know that this is also not a spreadsheet or database program. At any rate, there are some third-party plug-ins that make more formula options available. Check it out and I hope it helps you out.

 

 

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Me gusta

Anonymous
No aplicable

Sorry for almost 3 years late reply but it is possible to do it while remaining within AutoCAD.

steps would be - 

1. first add 1 rows in the table below the items list. it can be done manually.

2. The newly added vacant cell below the quantities - first unlock it from the property (click the cell to select it and then right-click menu. alternatively can be dome from properties window)

3. Once unlocked, go to the cell, double click it to see the cursor inside the cell, right-click - choose insert field.

4. in the field dialogue-box, choose formula from the "field names" pan in the extreme left.

5. choose "SUM" (present just right to the "field names" pan)

6. the moment you click on the sum, the field dialogue box disappears. the CAD then asks you to choose the cells you want to include in the calculation of the formula (in this case, the sum).

7. just click on the top left corner of the top-most cell and drag it to the bottom right corner of the bottom-most cell which you want to be part of the summation. (note - AutoCAD will not snap at the corner points but it is ok)

8. once you click at the bottom right corner, the field dialogue box will reappear and you will see the there us a formula in the "formula" box which would be something like "SUM(C01:C19)" where "C" is the row of the table.

9. Choose the precision level. in your case it is number of items so it would be whole number hence the precision would be set to 0. in some other cases (like area calculation etc. one may want to set 0.00 or 0.000 etc.)

10. click ok in the field dialogue box and then you will see the sum total of the values of selected cells appearing in the newly added bottom cell.

As general information, most of the basic excel capabilities are well integrated into AutoCAD and that is why it is considered the most robust industry solution.

 

I humbly disagree with you when you said "it is not a spreadsheet or database program". AutoCAD is essentially a full-fledged computer-aided program which not only capable of drawing something to visually communicate design intent, it is also capable to hold, list, manage and manipulate technical information associated with such CAD/CAM activities - in this case keeping a track of each object through attribute in the block and further providing the total number of such objects. without these capabilities, CAD/CAM activities can not be managed and hence are a core feature of AutoCAD. this way, I see AutoCAD essentially as a drawing+database management program.

0 Me gusta