Has anybody ever been successful to loop through a materialdatabase to see what type of materials are all in it ?
If so I could really use some pointers.
Thanks.SolidworksApi macros
If so I could really use some pointers.
Thanks.SolidworksApi macros

The reason why i need it is because I am making a small program tochange material properties for a batch of parts and I wanted todisplay the list of all available types.
I did find a couple of examples of this sort of thing that I willtry.
"I could never be bothered to do it."
You sound like it is a bad idea to do such a thing, may I ask why?
I just cannot get it. This is what I found but do to myinexperience am not able to get it to work could somebody lend afew words ?
Public articleDoc As New DOMDocument
Private Sub cmdClose_Click()
Unload Me
End Sub
Sub Form_Load()
LoadDocument"C:\Programme\SolidWorks\SolidWorks\lang\english\sldmaterials\solidworksmaterials.sldmat"
Dim sections As IXMLDOMNodeList
Dim ss As IXMLDOMNode
Set ss = articleDoc.childNodes.Item(i)
Set sections = ss.childNodes
SectionsList.Clear
For i = 1 To sections.length - 1
C = sections.Item(i).xml
SectionsList.AddItem sections.Item(i).Attributes.Item(0).nodeValue,x = 1
Next
SectionsList.ListIndex = 0
End Sub
Function LoadDocument(url As String)
articleDoc.async = False
articleDoc.Load url
End Function
Ben,
I recently did something like this where I changed the material of couple of parts using the macro. The only thing was that I used same material for all.