🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

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

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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

Find more posts tagged with

Sort by:
1 - 6 of 61
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Have a look at my screenshot.

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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

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

     

    Unable to find an attachment - read this blog

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

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