<?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 Set SolidBody Property: Body Appearance to &amp;quot;As Part&amp;quot; in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12192162#M156830</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am converting an STP file to a ipt or iam. While I'm doing that I am making sure some options and settings are set the way we like it. Right now I'm getting stuck trying to set the Body Appearance property of the solid body. I would also like to check the box to Clear All Overrides. I have found other posts that showed how to set this as a color in the list. However I want to set it to As Part. Which isn't in the appearance library. Does anyone know how to set it?&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="snappyjazz_0-1692821692523.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1257204i07473528D3515807/image-size/medium?v=v2&amp;amp;px=400" role="button" title="snappyjazz_0-1692821692523.png" alt="snappyjazz_0-1692821692523.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="snappyjazz_1-1692821713147.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1257205iFEC6463DF4E636C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="snappyjazz_1-1692821713147.png" alt="snappyjazz_1-1692821713147.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="snappyjazz_2-1692821727677.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1257206iEDB18DB001A4DA25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="snappyjazz_2-1692821727677.png" alt="snappyjazz_2-1692821727677.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 20:16:14 GMT</pubDate>
    <dc:creator>snappyjazz</dc:creator>
    <dc:date>2023-08-23T20:16:14Z</dc:date>
    <item>
      <title>Set SolidBody Property: Body Appearance to "As Part"</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12192162#M156830</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am converting an STP file to a ipt or iam. While I'm doing that I am making sure some options and settings are set the way we like it. Right now I'm getting stuck trying to set the Body Appearance property of the solid body. I would also like to check the box to Clear All Overrides. I have found other posts that showed how to set this as a color in the list. However I want to set it to As Part. Which isn't in the appearance library. Does anyone know how to set it?&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="snappyjazz_0-1692821692523.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1257204i07473528D3515807/image-size/medium?v=v2&amp;amp;px=400" role="button" title="snappyjazz_0-1692821692523.png" alt="snappyjazz_0-1692821692523.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="snappyjazz_1-1692821713147.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1257205iFEC6463DF4E636C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="snappyjazz_1-1692821713147.png" alt="snappyjazz_1-1692821713147.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="snappyjazz_2-1692821727677.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1257206iEDB18DB001A4DA25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="snappyjazz_2-1692821727677.png" alt="snappyjazz_2-1692821727677.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 20:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12192162#M156830</guid>
      <dc:creator>snappyjazz</dc:creator>
      <dc:date>2023-08-23T20:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set SolidBody Property: Body Appearance to "As Part"</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12192569#M156831</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3443549"&gt;@snappyjazz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Removing the overide I think is all you need. Appearance should default back to document appearance. If it doesn't meesage back with any error messages etc. See API help &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=SurfaceBody_ClearAppearanceOverrides" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Syntax
SurfaceBody.ClearAppearanceOverrides()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 00:05:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12192569#M156831</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-08-24T00:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set SolidBody Property: Body Appearance to "As Part"</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12193726#M156846</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3443549"&gt;@snappyjazz&lt;/a&gt;.&amp;nbsp; I am a little confused, because your code window seems to indicate that you are working with an assembly, and a variable named 'Occurance', which sounds similar to ComponentOccurrence (the API object for an assembly component), but your post title, and lower images indicate a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-SurfaceBody" target="_blank" rel="noopener"&gt;SurfaceBody&lt;/A&gt; API object.&amp;nbsp; If it is truly a solid body within a part, then what Alan suggested above should work OK.&amp;nbsp; But if it is a component within an assembly, that is a different story.&amp;nbsp; The &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-ComponentOccurrence" target="_blank" rel="noopener"&gt;ComponentOccurrence&lt;/A&gt; API object has a few properties you might be able to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=ComponentOccurrence_AppearanceSourceType" target="_blank" rel="noopener"&gt;ComponentOccurrence.AppearanceSourceType&lt;/A&gt;, which is a Read/Write property with a value from the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=AppearanceSourceTypeEnum" target="_blank" rel="noopener"&gt;AppearanceSourceTypeEnum&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=ComponentOccurrence_Appearance" target="_blank" rel="noopener"&gt;ComponentOccurrence.Appearance&lt;/A&gt;, which has an Asset type value.&lt;/P&gt;
&lt;P&gt;But before trying to mess with either of those on individual components, you could first try using the method of the main &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=AssemblyComponentDefinition_ClearAppearanceOverrides" target="_blank" rel="noopener"&gt;AssemblyComponentDefinition.ClearAppearanceOverrides&lt;/A&gt;, which takes an optional input ObjectCollection containing some components.&amp;nbsp; Then the other route might be to do this through the active DVR (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-DesignViewRepresentation" target="_blank" rel="noopener"&gt;DesignViewRepresentation&lt;/A&gt;), which has the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DesignViewRepresentation_RemoveAppearanceOverrides" target="_blank" rel="noopener"&gt;DesignViewRepresentation.RemoveAppearanceOverrides&lt;/A&gt;&amp;nbsp;method, but that will clear all appearance overrides under the control of that DVR, with no optional input objects.&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp; There is also the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=PartComponentDefinition_ClearAppearanceOverrides" target="_blank" rel="noopener"&gt;PartComponentDefinition.ClearAppearanceOverrides&lt;/A&gt; method, which also takes an optional input ObjectCollection, that can contain several types of things that are common in parts.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 12:11:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12193726#M156846</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-08-24T12:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set SolidBody Property: Body Appearance to "As Part"</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12194437#M156855</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;Ah, thank you. I missed that when I was looking through the options of the "SurfaceBody" object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;You're correct. In the code posted I am working with an assembly. Some of the STP files we get are assemblies. One of the things I wanted to accomplish is to clear the component occurrence names, so they use the default setting. I wasn't sure if I could access the solid body of the part through the component occurrence or if I need to cycle each part and open the document so I can access it. I'm in an exploratory phase and so my approach looks questionable, trust me I'm answering some of my own questions. haha&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to access the document through the component occurrence. From the part document I was able to create a part component definition which as shown above gave me access to the clear appearance override. When the program finished I opened one of the parts in the assembly and checked the solid body appearance and it said "As Part". Success!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Restablish the occurance document as a part document
Dim LocalDoc as Inv.PartDocument = OccDoc
' Get the Component Definition from the Part Doc
Dim LocalDef as Inv.PartComponentDefinition = LocalDoc.ComponentDefinition
' Remove the material and appearances to change solid body appearance
LocalDef.Material.Delete()
LocalDef.ClearAppearanceOverrides()&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 24 Aug 2023 16:23:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-solidbody-property-body-appearance-to-quot-as-part-quot/m-p/12194437#M156855</guid>
      <dc:creator>snappyjazz</dc:creator>
      <dc:date>2023-08-24T16:23:51Z</dc:date>
    </item>
  </channel>
</rss>

