Multi-Material Table

Hello

I have a question about MEPs in SW2014, I have an assembly and I would like to know the total mass per material. For example:

Total mass S235: 500KG
Total Mass 304L: 300KG

Is it possible to do this automatically?

Thank you all! Have a nice day.

By subject, I think that this is not possible,

 

On the other hand, you can create subassemblies by material, give them the right material, and then, recover the property of mass by material.

 

All you have to do is go through a property form.

 

You'll probably have to do intermediate mep to display each weight, and then write the note back on the sheet where you have all your materials.

 

To try

2 Likes

Agree with @Bart.

Otherwise you can associate the materials by a coef just in the drawing, example:

Total mass S235: 500KG
Total Mass 304L: (=S235x0.6): 300KG

etc...

And that way you don't have to touch your assembly.

1 Like

You want to know in your assembly the total mass of stainless steel parts, the total mass of HDPE parts, the total mass of steel parts... or have the mass of your assembly if it is made entirely of steel / stainless steel / HDPE ....????

Hello

If you're familiar with macros, it's possible to create one (but it will take a bit of work).

To familiarize yourself with the code, I advise you to watch the save-under macro that I posted as a tutorial on Lynkoa where each line is commented:

http://www.lynkoa.com/tutos/3d/macro-enregistrer-sous-avec-solidworks

Then, for your macro, you will have to

1) Iterate on each of the components, based on this macro:
https://forum.solidworks.com/thread/28710

2) Check what the material is:
http://help.solidworks.com/2014/English/api/sldworksapi/get_and_set_material_visual_properties_example_vb.htm

3) Recover your volume:
http://help.solidworks.com/2012/English/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IMassProperty~Volume.html

4) Create a total volume variable :
For example, to assign a property: CODE = SWmoddoc.CustomInfo("code")
More details on this link: 
http://www.lynkoa.com/forum/autres/vba-excel-pour-solidworks?page=0#answer-123844

5) Calculate the weight according to your volume for each material:
With a simple calculation in VBA

6) Create a total weight variable for each material: see point 4)

Hello

In automatic I don't see but with a nomenclature it is quite simple and fast, we sort by materials and we add a line below each category of materials in which in calculation the sum of the masses above.

@+

 

3 Likes

My technique works, but @Coyote's is really not stupid.

 

- Add a small BOM table with just the parts, materials and weight columns

- And sort to sum the weights of the parts according to the material