material editor in inv 2013

material editor in inv 2013

Anonymous
Not applicable
420 Views
1 Reply
Message 1 of 2

material editor in inv 2013

Anonymous
Not applicable

hi,

 

what are the uses of the properties in material editor in inventor2013?

 

ive attached an image of the window here.

can i extract those info?

 

 

0 Likes
421 Views
1 Reply
Reply (1)
Message 2 of 2

philippe.leefsma
Alumni
Alumni

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

0 Likes