<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic To Create Material Library for Material, Finish (Color) &amp;amp; Appearance in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8697374#M96161</link>
    <description>&lt;P&gt;I am creating a comprehensive material library for material, finish (color and paint spec) and texture (expanded metal, perforated sheet, gratings etc.).&lt;/P&gt;
&lt;P&gt;I tried with so many leads through the whole day. But could not get through a workable solution.&lt;/P&gt;
&lt;P&gt;I shall be most grateful if someone help me.&lt;/P&gt;
&lt;P&gt;Libraries to do with are:&lt;/P&gt;
&lt;P&gt;Material libraries&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Inventor Material Library&lt;/LI&gt;
&lt;LI&gt;Autodesk Material Library&lt;/LI&gt;
&lt;LI&gt;InventorMaterialLibrary_RWEI&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Appearance Libraries&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;InventorMaterialLibrary_RWEI&lt;/LI&gt;
&lt;LI&gt;RWEI Appearance Library&lt;/LI&gt;
&lt;LI&gt;RWEI Texture Library&lt;/LI&gt;
&lt;LI&gt;RWEI Appearance Library RAL&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;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
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 19_57_04.png" style="width: 539px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620671i4EBB1BCB0A4E42CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 19_57_04.png" alt="2019-03-31 19_57_04.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 19_48_50.png" style="width: 965px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620672iAA8224DDCA3C3A5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 19_48_50.png" alt="2019-03-31 19_48_50.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 20_04_57.png" style="width: 577px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620673i1405409E6EDBC7E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 20_04_57.png" alt="2019-03-31 20_04_57.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 14_55_41.png" style="width: 580px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620674i70C1BF7A671E35C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 14_55_41.png" alt="2019-03-31 14_55_41.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 15_11_01.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620675i28896A8C0B100014/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 15_11_01.png" alt="2019-03-31 15_11_01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Autodesk Inventor Professional 2019&lt;/P&gt;
&lt;P&gt;Vault Professional 2019&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 04:37:17 GMT</pubDate>
    <dc:creator>RoyWickrama_RWEI</dc:creator>
    <dc:date>2019-04-01T04:37:17Z</dc:date>
    <item>
      <title>To Create Material Library for Material, Finish (Color) &amp; Appearance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8697374#M96161</link>
      <description>&lt;P&gt;I am creating a comprehensive material library for material, finish (color and paint spec) and texture (expanded metal, perforated sheet, gratings etc.).&lt;/P&gt;
&lt;P&gt;I tried with so many leads through the whole day. But could not get through a workable solution.&lt;/P&gt;
&lt;P&gt;I shall be most grateful if someone help me.&lt;/P&gt;
&lt;P&gt;Libraries to do with are:&lt;/P&gt;
&lt;P&gt;Material libraries&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Inventor Material Library&lt;/LI&gt;
&lt;LI&gt;Autodesk Material Library&lt;/LI&gt;
&lt;LI&gt;InventorMaterialLibrary_RWEI&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Appearance Libraries&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;InventorMaterialLibrary_RWEI&lt;/LI&gt;
&lt;LI&gt;RWEI Appearance Library&lt;/LI&gt;
&lt;LI&gt;RWEI Texture Library&lt;/LI&gt;
&lt;LI&gt;RWEI Appearance Library RAL&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;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
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 19_57_04.png" style="width: 539px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620671i4EBB1BCB0A4E42CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 19_57_04.png" alt="2019-03-31 19_57_04.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 19_48_50.png" style="width: 965px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620672iAA8224DDCA3C3A5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 19_48_50.png" alt="2019-03-31 19_48_50.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 20_04_57.png" style="width: 577px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620673i1405409E6EDBC7E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 20_04_57.png" alt="2019-03-31 20_04_57.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 14_55_41.png" style="width: 580px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620674i70C1BF7A671E35C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 14_55_41.png" alt="2019-03-31 14_55_41.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-31 15_11_01.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/620675i28896A8C0B100014/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-31 15_11_01.png" alt="2019-03-31 15_11_01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Autodesk Inventor Professional 2019&lt;/P&gt;
&lt;P&gt;Vault Professional 2019&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 04:37:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8697374#M96161</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2019-04-01T04:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: To Create Material Library for Material, Finish (Color) &amp; Appearance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8697570#M96164</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2129088"&gt;@RoyWickrama_RWEI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even through UI, appearance of assembly can not be changed. Other way is change to all occurrences in assembly to required appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 07:21:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8697570#M96164</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-04-01T07:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: To Create Material Library for Material, Finish (Color) &amp; Appearance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8698600#M96186</link>
      <description>&lt;P&gt;Thanks Chandra Shekar G,&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;Step-1:&lt;/P&gt;
&lt;P&gt;to choose the &lt;FONT color="#3366FF"&gt;material library&lt;/FONT&gt; from the drop-down list of available libraries&lt;/P&gt;
&lt;P&gt;Step-2:&lt;/P&gt;
&lt;P&gt;to select the &lt;FONT color="#3366FF"&gt;material&lt;/FONT&gt; from the drop-down list of materials available from within the selected library of materials in Step-1&lt;/P&gt;
&lt;P&gt;Step-3:&lt;/P&gt;
&lt;P&gt;to choose the &lt;FONT color="#3366FF"&gt;appearance library&lt;/FONT&gt; from the drop-down list of available appearance libraries&lt;/P&gt;
&lt;P&gt;Step-4:&lt;/P&gt;
&lt;P&gt;to select the &lt;FONT color="#3366FF"&gt;appearance&lt;/FONT&gt; from the&amp;nbsp;drop-down list of appearances available from within the selected library of appearances in Step-3&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 14:39:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8698600#M96186</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2019-04-01T14:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: To Create Material Library for Material, Finish (Color) &amp; Appearance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8703846#M96260</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2129088"&gt;@RoyWickrama_RWEI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below iLogic code to get material library, selected material from material library, appearance library and selected appearance from appearance library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before running this iLogic code, read the difference between material library and appearance library from below link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/vba-detect-matrial-or-appearance-library/td-p/5463824" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/vba-detect-matrial-or-appearance-library/td-p/5463824&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;'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 &amp;gt; 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")
&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 09:56:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8703846#M96260</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-04-03T09:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: To Create Material Library for Material, Finish (Color) &amp; Appearance</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8706483#M96305</link>
      <description>&lt;P&gt;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).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 06:48:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/to-create-material-library-for-material-finish-color-amp/m-p/8706483#M96305</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2019-04-04T06:48:50Z</dc:date>
    </item>
  </channel>
</rss>

