Count the number of pieces

Hello

 

I use Solidworks 2016 and I have a complex assembly and from my final assembly, I have to count the total number of parts, the number of sub-assemblies etc to then write it in the drawing of each one.

When I use the Evaluate / Vusualize menu of the assembly, it does not add the parts in the sub-assemblies which distorts the data. The method I use is to select the part or subassembly, do Select identical component and save the list, and I have the number.

 

Is there a macro that could list the right number of total coins by the selection???

 

Thank you very much

 

Rejean

Hello

You're doing well in this menu:

"Tools > Evaluate > Performance Evaluation > Statistics"?

This should display all of this information:

In addition to the diagnostic tests it performs, Performance Evaluation returns statistics about the components and stresses in an assembly.

  • Total number of components
  • Number of unique parts and subassemblies
  • Number of unique subassemblies and subassembly documents
  • Maximum depth of assembly hierarchy (for nested subassemblies)
  • Number of 1st Level Components
  • Number of components resolved, lightened and eliminated
  • Number of 1st level constraints
  • Number of bodies

Otherwise, we can simply make a bill of materials, and add up the quantity column:

Inserting > Tables > BOM

For the quantity, more info here:

http://help.solidworks.com/2013/French/SolidWorks/sldworks/c_Equations_in_Tables_and_BOMs.htm

Edit: I just reread the question, and for a selection of parts with the mouse, this macro should work:

http://www.lynkoa.com/tutos/macro-solidworks-compter-les-pi%C3%A8ces-s%C3%A9lectionn%C3%A9es

 

3 Likes

Hello

After testing the macro, I have the result just of the room selected. I would like, either by selecting a part or sub-assembly in the tree, to be able to have the total number of components identical in the assembly. I think it's maybe a bit complicated because I don't know much about macro.

The only option right now is to select, go to select and choose Select identical components, and save the selection and it gives me the total number of parts in the assembly. But the process is still long. ;o(((

1 Like