Hi Akosi,
An API to access the new material library is available in Inventor 2014 but for 2013, I'm afraid it's not doable.
Materials are represented by Appearance Assets and each appearance contains a variable collection of assets. Here is a sample that iterates through appearance of the current document:
Public Sub DumpDocumentAppearances()
' Check that a part or assembly document is active.
If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject And _
ThisApplication.ActiveDocumentType <> kPartDocumentObject Then
MsgBox "A part or assembly must be active."
Exit Sub
End If
Dim doc As Document
Set doc = ThisApplication.ActiveDocument
' Open a file to write the results.
Open "C:\Temp\DocumentAppearanceDump.txt" For Output As #1
Dim appearance As Asset
For Each appearance In doc.AppearanceAssets
Print #1, " Appearance"
Print #1, " DisplayName: " & appearance.DisplayName
Print #1, " HasTexture: " & appearance.HasTexture
Print #1, " IsReadOnly: " & appearance.IsReadOnly
Print #1, " Name: " & appearance.Name
Dim value As AssetValue
For Each value In appearance
Call PrintAssetValue(value, 8)
Next
Next
Close #1
MsgBox "Finished writing output to ""C:\Temp\DocumentAppearanceDump.txt"""
End Sub
Regards,
Philippe.
Philippe Leefsma
Developer Technical Services
Autodesk Developer Network