How to create a list of area, volume and total mass for all components

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi all,

 

I was wondering if it would be possible to generate a table of components, with the area, volume and total mass.

It would look something like this:

 

myFilename.txt or myFilename.csv (at least a text-based file format)

 

ComponentID1, ComponentName01, Area, Volume, TotalMass

ComponentID2, ComponentName02, Area, Volume, TotalMass

et cetera

 

Previously, I have used Tools > Mass calc, and then manually noted down the values in an Excel file.

My model is becoming to big at the moment to keep working like that.

 

Kind regards,

Robbin

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Try my script. Here's is output for my test:

     ID,Name,Area,Volume,Mass 22,m_QUAD4,4.02940827E+002,6.04411241E+002,4.71440768E-006 24,m_QUAD8,4.00000000E+002,6.00000000E+002,4.68000000E-006 31,m_TET4,0.00000000E+000,3.91417029E+003,3.05305282E-005 32,m_TET10,0.00000000E+000,3.91417029E+003,3.05305282E-005

    HTH,

    Unable to find an attachment - read this blog

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited April 2016

    I have downloaded your script, and try to use it via:

     

    File > Run / Tcl/Tk script

     

    I am given the opportunity to select a component then, and to click Proceed.

    It seems like something is happening, but it took quite long.

     

    Hence, I did setup a small model of just a simple beam that is loaded on one side, and constrained on the other.

    Again I ran the script, choose the component, but nothing seems to happen.

     

    Do you mind sharing your source code, or explain how you would access the values (area, volume, mass)?

     

    Kind regards,

    Robbin

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited April 2016

    Have a look at my screenshot.

    <?xml version="1.0" encoding="UTF-8"?>check_comp.png

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Here's new version. You'll asked to save directly into CSV file.

     

    Unable to find an attachment - read this blog

  • tinh
    tinh Altair Community Member
    edited April 2016

    Hi,

    There is an available macro in tab Utility>Tool>Component Table, that you can use to export component information (Name, Id, mass,...) to CSV file

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited April 2016

    Thanks, the script works :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />