<?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 Re: Render style in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12974170#M171028</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14960749"&gt;@dhanshri_gavas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RenderStyles are &lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-2912C0FB-885F-47ED-81C3-AF19584EA9C1" target="_blank" rel="noopener"&gt;obsolete&lt;/A&gt; and is no longer supported. You need to use &lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-9CD3F311-E5BD-4151-8EF9-8E9806A02609" target="_blank" rel="noopener"&gt;Assets&lt;/A&gt; and its AssetValues instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This simple rule prints the ActiveAppearance.AssetValues to iLogic log window. You can choose which one is important for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim result As New System.Text.StringBuilder()
result.AppendLine("AssetValues")
Dim part As PartDocument = ThisDoc.Document
For Each oAssetValue As AssetValue In part.ActiveAppearance
	result.AppendFormat("{1}{0}{2}{0}{3}" &amp;amp; vbCrLf, vbTab, oAssetValue.DisplayName, oAssetValue.Name, oAssetValue.ValueType)
Next
Logger.Debug(result.ToString)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2024 07:52:37 GMT</pubDate>
    <dc:creator>Michael.Navara</dc:creator>
    <dc:date>2024-08-22T07:52:37Z</dc:date>
    <item>
      <title>Render style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12971945#M171008</link>
      <description>&lt;P&gt;How can I retrieve the render style (RGB color value) from a document using an API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 10:37:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12971945#M171008</guid>
      <dc:creator>dhanshri_gavas</dc:creator>
      <dc:date>2024-08-21T10:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Render style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12974170#M171028</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14960749"&gt;@dhanshri_gavas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RenderStyles are &lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-2912C0FB-885F-47ED-81C3-AF19584EA9C1" target="_blank" rel="noopener"&gt;obsolete&lt;/A&gt; and is no longer supported. You need to use &lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-9CD3F311-E5BD-4151-8EF9-8E9806A02609" target="_blank" rel="noopener"&gt;Assets&lt;/A&gt; and its AssetValues instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This simple rule prints the ActiveAppearance.AssetValues to iLogic log window. You can choose which one is important for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim result As New System.Text.StringBuilder()
result.AppendLine("AssetValues")
Dim part As PartDocument = ThisDoc.Document
For Each oAssetValue As AssetValue In part.ActiveAppearance
	result.AppendFormat("{1}{0}{2}{0}{3}" &amp;amp; vbCrLf, vbTab, oAssetValue.DisplayName, oAssetValue.Name, oAssetValue.ValueType)
Next
Logger.Debug(result.ToString)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 07:52:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12974170#M171028</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-08-22T07:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Render style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12976286#M171069</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;From the above code, I am not getting an RGB value; to be more specific, attaching the image below. Want to get that value?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dhanshri_gavas_0-1724386304209.png" style="width: 275px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1401209iFD7E7A22E36E2E85/image-dimensions/275x166?v=v2" width="275" height="166" role="button" title="dhanshri_gavas_0-1724386304209.png" alt="dhanshri_gavas_0-1724386304209.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="dhanshri_gavas_1-1724386352689.png" style="width: 239px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1401210i5244D79A6619726A/image-dimensions/239x473?v=v2" width="239" height="473" role="button" title="dhanshri_gavas_1-1724386352689.png" alt="dhanshri_gavas_1-1724386352689.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 04:13:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12976286#M171069</guid>
      <dc:creator>dhanshri_gavas</dc:creator>
      <dc:date>2024-08-23T04:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Render style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12976413#M171070</link>
      <description>&lt;P&gt;You have to play with it. You need to look at the individual values, its type and compare the values with the UI. Here is sample how to filter asset values by its &lt;EM&gt;&lt;STRONG&gt;ValueType&lt;/STRONG&gt;&lt;/EM&gt; and obtain RGB values of &lt;EM&gt;&lt;STRONG&gt;Generic-&amp;gt;Color&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;Self Illumination-&amp;gt;Filter Color&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Sub main
	Dim result As New System.Text.StringBuilder()
	result.AppendLine("AssetValues")
	Dim part As PartDocument = ThisDoc.Document
	For Each oAssetValue As AssetValue In part.ActiveAppearance
		If Not oAssetValue.ValueType = AssetValueTypeEnum.kAssetValueTypeColor Then Continue For

		Dim colorValue As Inventor.ColorAssetValue = oAssetValue
		Dim c As Color = colorValue.Value

		result.AppendFormat("{1}{0}{2}{0}{3}" &amp;amp; vbCrLf, vbTab,
		oAssetValue.DisplayName,
		oAssetValue.Name,
		ColorToString(c)
		)
	Next
	Logger.Debug(result.ToString)

	'Direct access
	Logger.Debug("Generic-&amp;gt;Color: {0}", ColorToString(part.ActiveAppearance("generic_diffuse").Value))
	Logger.Debug("Self Illumination-&amp;gt;Filter Color: {0}", ColorToString(part.ActiveAppearance("generic_self_illum_filter_map").Value))

End Sub

Function ColorToString(color As Color)
	Return String.Format("[{0}, {1}, {2}]", color.Red, color.Green, color.Blue)
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 06:15:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/render-style/m-p/12976413#M171070</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-08-23T06:15:34Z</dc:date>
    </item>
  </channel>
</rss>

