How to retrieve the material of a part in an excel file?

I would like to extract from a solidworks part file the name of the material of this part.

Thank you

Hello

It's for an excel file with configurations, I don't think it's possible??? For it is a property of the list of welded pieces; you have to make a note with this formula "Material: $PRPWLD:"Material"" but for that you will have to assign a material to the part and that is a sheet metal part and in the creation tree there is a list of welded parts right-click on it and update automatically and there the note will  work....

 Hello

Thank you Cobra for your interest in the subject.

For greater precision, these are not configurations of sheet metal or welded assembly.

It's just a mechanical part from which I simply want to retrieve the name of the material in an excel file or in a text file. Normally this property should be in the cartridge and you would have to retrieve it using a macro.

Thank you

Ok, well you just have to create a custom property and fill it manually each time you create a part and then link this property to a box in the MEP or create parts in the same style as PRTDOT MEPs with this properties already pre-filled as well as the material. We operate in this way.

1 Like

Hello

When you want to add a row or column it offers you to import properties, all you have to do is choose the one you want, in this case the material property.

May the force be with you

Otherwise if you have the mycad tool there is smartbom which allows you to retrieve in an assembly the properties of each part (sheet metal material...) in a nomenclature such as excel, csv...

bonjpur 

The very simple macro_materiau macro solves the problem (the name of the material will appear in the vba execution window. If you want to retrieve the name in a user form, you can use the show Material macro.

Be careful, macros must be loaded after opening a part file in solidworks.

Thank you to everyone who has been interested in the subject!

 


macromat.zip
1 Like