- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am creating a comprehensive material library for material, finish (color and paint spec) and texture (expanded metal, perforated sheet, gratings etc.).
I tried with so many leads through the whole day. But could not get through a workable solution.
I shall be most grateful if someone help me.
Libraries to do with are:
Material libraries
- Inventor Material Library
- Autodesk Material Library
- InventorMaterialLibrary_RWEI
Appearance Libraries
- InventorMaterialLibrary_RWEI
- RWEI Appearance Library
- RWEI Texture Library
- RWEI Appearance Library RAL
Sub Main()
Dim oDoc = ThisDoc.Document
Dim assetLib As AssetLibrary
Dim oList_Assets As New ArrayList
For Each oAssetLibrary In ThisApplication.AssetLibraries
oList_Assets.Add(oAssetLibrary.DisplayName)
Next oAssetLibrary
oAssetLibrary_Selected = InputListBox("SELECT REQ'D LIB. FROM ABOVE!", oList_Assets, oList_Assets.Item(0), "CHANGE MATERIAL ASSET LIB.", "LIST OF ASSET LIBRARIES")
oIndex = oList_Assets.indexof(oAssetLibrary_Selected)
' Dim oAppearanceAssets As AssetsEnumerator
' oAppearanceAssets = oPartDoc.AppearanceAssets
oAssetlib = ThisApplication.AssetLibraries.oList_Assets(oIndex)
' ThisApplication.ActiveAppearanceLibrary = oAssetLibrary_Selected.indexof(oAssetLibrary_Selected)
End Sub
Autodesk Inventor Professional 2019
Vault Professional 2019
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Even through UI, appearance of assembly can not be changed. Other way is change to all occurrences in assembly to required appearance.
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks Chandra Shekar G,
I today thought to let you know about my latest posting requesting help to build material library. It is fine that you are already aware of this posting. (I saw a few of your postings in this area). Could you help me on the followings:
Step-1:
to choose the material library from the drop-down list of available libraries
Step-2:
to select the material from the drop-down list of materials available from within the selected library of materials in Step-1
Step-3:
to choose the appearance library from the drop-down list of available appearance libraries
Step-4:
to select the appearance from the drop-down list of appearances available from within the selected library of appearances in Step-3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Try below iLogic code to get material library, selected material from material library, appearance library and selected appearance from appearance library.
Before running this iLogic code, read the difference between material library and appearance library from below link.
'Step 1
Dim oLibrary As AssetLibrary
Dim oMaterialLibrary As String
Dim oMaterialList As New ArrayList
For Each oLibrary In ThisApplication.AssetLibraries
If oLibrary.MaterialAssets.Count > 0 Then
oMaterialList.Add(oLibrary.DisplayName)
End If
Next
oMaterialLibrary = InputListBox("Select materilal library", oMaterialList, oMaterialList.Item(0), Title := "Material library", ListName := "Material library List")
'Step 2
Dim oSelected_Material_Library As AssetLibrary
oSelected_Material_Library = ThisApplication.AssetLibraries.Item(oMaterialLibrary)
Dim oMaterialAsset As MaterialAsset
Dim oMaterialAssetList As New ArrayList
Dim oSelected_Material As String
For Each oMaterialAsset In oSelected_Material_Library.MaterialAssets
oMaterialAssetList.Add(oMaterialAsset.DisplayName)
Next
oSelected_Material = InputListBox("Select material from list", oMaterialAssetList, oMaterialAssetList.Item(0), Title := "Material", ListName := "Material List")
MessageBox.Show(oSelected_Material, "Material")
'Step 3
Dim oAppearanceLibrary As String
Dim oAppearanceList As New ArrayList
For Each oLibrary In ThisApplication.AssetLibraries
If oLibrary.MaterialAssets.Count = 0 Then
oAppearanceList.Add(oLibrary.DisplayName)
End If
Next
oAppearanceLibrary = InputListBox("Select appearance library", oAppearanceList, oAppearanceList.Item(0), Title := "Appearance library", ListName := "Appearance library List")
'Step 4
Dim oSelected_Appearence_Library As AssetLibrary
oSelected_Appearence_Library = ThisApplication.AssetLibraries.Item(oAppearanceLibrary)
Dim oAppearanceAsset As Asset
Dim oAppearanceAssetList As New ArrayList
Dim oSelected_Appearance As String
For Each oAppearanceAsset In oSelected_Appearence_Library.AppearanceAssets
oAppearanceAssetList.Add(oAppearanceAsset.DisplayName)
Next
oSelected_Appearance = InputListBox("Select appearance from list", oAppearanceAssetList, oAppearanceAssetList.Item(0), Title := "Appearance", ListName := "Appearance List")
MessageBox.Show(oSelected_Appearance, "Appearance")
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
It is doing well. I am tailoring to retrieve my needs. Therefore, I would like to revert back to you for some more help (may be).