hello everyone,
I need your help to extract (and display) the name of the material of each components from an assembly on an excel file. Currently, we succeed to extract different data for each component like the mass, volume, density ect.. and display them on an Excel file. Currently I have succeed to extract the material from a part document ONLY in an other macro ( I attach it in the post ("material")). But when I add this macro in my "macro final" (for an assembly), it doesn't works...
That I would :
I would that someone help me to add some lines in my "macro final" which allow to extract the material of EACH components from the active assembly.
Thank you in advance for your help.
AUBERT Romain.
SolidworksApi macros
You do not need a macro but you can either insert a BOM in assembly OR use assembly visualization tool to get all material listed and export either or both of these tables as excel file.Just few clicks and you are done.
Yes but how can I add the material information to my excel that have already create with my macro ? ( I'm working on a project for a university and I have to automatized the extraction of data by a macro).
You can use the codes from this example and get the component properties as desired without opening them Traverse Assembly at Component Level Example (VBA)
Here are another posts which might be more useful