Message 1 of 9

Not applicable
07-19-2013
12:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dim oPartDoc As PartDocument Set oPartDoc = ThisApplication.ActiveDocument Dim material As material For Each material In oPartDoc.Materials Debug.Print material.Name 'This prints all names of material in the part Document (including local material) Next Debug.Print "====================================================" Dim matAsset As MaterialAsset For Each matAsset In oPartDoc.MaterialAssets 'This prints only the local material Debug.Print matAsset.DisplayName Next
Material and materials are working well with Inventor 2014, but while writing code material and materials are not accessible thru dropdown and we have to type them.
Inventor 2014 API major change is material to material assets and assets are available thru dropdown while writing code.
Is it possible to get all the material names of part document using asset method? If Yes, Please explain. Or we have to use the old API method of material and materials by typing full (without selecting from drop down)
Solved! Go to Solution.