VBA material modification

Hello

 

I have a problem, we have updated our materials recently, the E24 which goes to S235 but it is a problem with one of our connectors.

We have to replace the E24 material with S235 manually, I was thinking of making a macro to automate the task but I have the impression that it is impossible.

 

In the solidworks API help I can't find the possibility to replace a material with a material other than the one in the solidworks library .

 

If you have an answer or a possible workaround...

As much as for me I had to misspecify the path of our custom library in macro recording, it works, I was able to reuse the code behind it.

                Part.SetMaterialPropertyName2 "Default", "LIBRARY PATH", "S 235"
 

Sorry for the inconvenience.