<?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: Multiple Thicken features on multiple bodies in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11190174#M138475</link>
    <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12460435"&gt;@Aririmo&lt;/a&gt;.&amp;nbsp; I tried your code on a single, simple block model in a part document, and it failed, so I played around with it a bit to get it to work.&amp;nbsp; There are several reasons why this might fail, but one of the reasons it failed for me was the size of the offset.&amp;nbsp; Another reason for failure is if not all faces in the input face collection are connected.&amp;nbsp; The offset distance you specify can either be a raw numerical value, or a String.&amp;nbsp; If you supply a raw numerical value, it will be interpreted as 'database units' for length (centimeters).&amp;nbsp; If you supply a String, it can still be a numerical value within the quotes, but you can also specify units.&amp;nbsp; If you use the string, but don't specify units, it will default to 'document units' for length.&amp;nbsp;&amp;nbsp; This messes some folks up, due to units conversions.&amp;nbsp; If the size is too much it will either not be able to compute it, or it may create a feature with the little information symbol beside it, because the feature had no physical effect on the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS.&amp;nbsp; If you want it to continue trying to create more features, even if it fails to create one, or encounters an error, you can put the line that creates the feature after the 'On Error Resume Next' phrase.&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 17:26:46 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2022-05-24T17:26:46Z</dc:date>
    <item>
      <title>Multiple Thicken features on multiple bodies</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11189982#M138468</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the thicken features on multiple faces of multiple bodies, but I cannot get more than one thicken feature, my program stops after the first iteration.&lt;/P&gt;&lt;P&gt;Here is the code I tried :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Private Sub MultipleThickens()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oApp As Inventor.Application&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Set oApp = ThisApplication&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oPartDoc As PartDocument&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Set oPartDoc = oApp.ActiveDocument&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oCompDef As PartComponentDefinition&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Set oCompDef = oPartDoc.ComponentDefinition&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oSB As SurfaceBody&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oFacesCol As FaceCollection&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Set oFacesCol = oApp.TransientObjects.CreateFaceCollection&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oFace As Face&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dim oThickFeat As ThickenFeature&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For Each oSB In oCompDef.SurfaceBodies&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; For Each oFace In oSB.Faces&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; Call oFacesCol.Add(oFace)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; Next&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Set oThickFeat = oCompDef.Features.ThickenFeatures.Add(oFacesCol, 5, kNegativeExtentDirection, kCutOperation)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Call oFacesCol.Clear&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Next&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;End Sub&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should I do to create a new thicken feature for each body iteration ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 16:04:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11189982#M138468</guid>
      <dc:creator>Aririmo</dc:creator>
      <dc:date>2022-05-24T16:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Thicken features on multiple bodies</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11190174#M138475</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12460435"&gt;@Aririmo&lt;/a&gt;.&amp;nbsp; I tried your code on a single, simple block model in a part document, and it failed, so I played around with it a bit to get it to work.&amp;nbsp; There are several reasons why this might fail, but one of the reasons it failed for me was the size of the offset.&amp;nbsp; Another reason for failure is if not all faces in the input face collection are connected.&amp;nbsp; The offset distance you specify can either be a raw numerical value, or a String.&amp;nbsp; If you supply a raw numerical value, it will be interpreted as 'database units' for length (centimeters).&amp;nbsp; If you supply a String, it can still be a numerical value within the quotes, but you can also specify units.&amp;nbsp; If you use the string, but don't specify units, it will default to 'document units' for length.&amp;nbsp;&amp;nbsp; This messes some folks up, due to units conversions.&amp;nbsp; If the size is too much it will either not be able to compute it, or it may create a feature with the little information symbol beside it, because the feature had no physical effect on the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS.&amp;nbsp; If you want it to continue trying to create more features, even if it fails to create one, or encounters an error, you can put the line that creates the feature after the 'On Error Resume Next' phrase.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:26:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11190174#M138475</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-05-24T17:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Thicken features on multiple bodies</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11190449#M138482</link>
      <description>&lt;P&gt;I did have a quick look at and this iLogic code did work for me.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim oPartDoc As PartDocument = ThisDoc.Document
Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition

For Each oSB As SurfaceBody In oCompDef.SurfaceBodies
    Dim oFacesCol As FaceCollection = ThisApplication.TransientObjects.CreateFaceCollection()

    For Each oFace As Face In oSB.Faces
        Call oFacesCol.Add(oFace)
    Next
    oCompDef.Features.ThickenFeatures.Add(oFacesCol, 0.5,
            PartFeatureExtentDirectionEnum.kNegativeExtentDirection,
            PartFeatureOperationEnum.kCutOperation)
Next&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 19:36:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11190449#M138482</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-05-24T19:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Thicken features on multiple bodies</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11191885#M138512</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;,&amp;nbsp;even if your solution did not work with VBA, it works on Ilogic.&lt;/P&gt;&lt;P&gt;It's still a mystery why it does not work with VBA...&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 10:17:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11191885#M138512</guid>
      <dc:creator>Aririmo</dc:creator>
      <dc:date>2022-05-25T10:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Thicken features on multiple bodies</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11191887#M138513</link>
      <description>Thank you for your response and your help.</description>
      <pubDate>Wed, 25 May 2022 10:19:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-thicken-features-on-multiple-bodies/m-p/11191887#M138513</guid>
      <dc:creator>Aririmo</dc:creator>
      <dc:date>2022-05-25T10:19:41Z</dc:date>
    </item>
  </channel>
</rss>

