<?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: How to do a SplitFeature on a SketchLine3D and a SurfaceBody in C#? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10589864#M128370</link>
    <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;Yes. We use &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-6FF4757E-48CD-443B-85A4-7A39B905E5BE" target="_blank" rel="noopener"&gt;SplitFeatures.SplitFaces&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Some C#-like pseudocode:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Path path = PartFeatures.CreatePath(SketchLine3D);
var objColl = TransientObjects.CreateObjectCollection();
objColl.Add(SurfaceBody.Faces[1]);
var split = splitFeatures.SplitFaces(path, false, objColl);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 08:37:59 GMT</pubDate>
    <dc:creator>Jo_Perturbable</dc:creator>
    <dc:date>2021-09-01T08:37:59Z</dc:date>
    <item>
      <title>How to do a SplitFeature on a SketchLine3D and a SurfaceBody in C#?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/9830529#M117395</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to split a BoundaryPatch with a SketchLine in C# in Inventor Professional 2021.1.2 Build 245.&lt;/P&gt;&lt;P&gt;I've tried with SplitFeatures.SplitBody:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SketchLine3D with a SurfaceBody&lt;/LI&gt;&lt;LI&gt;Create a Path from the SketchLine3D and then with a SurfaceBody&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I've also tried with SplitFeatures.SplitFaces to no avail.&lt;/P&gt;&lt;P&gt;This works manually in the UI. But I don't get it to work in code. How do I create a Path object correctly?&lt;BR /&gt;See attached code and part.&lt;/P&gt;&lt;P&gt;Code in short also here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var componentDefinition = sketch3D.Parent as ComponentDefinition;
var partComponentDefinition = sketch3D.Parent as PartComponentDefinition;
var splitFeatures = partComponentDefinition.Features.SplitFeatures;
SketchLine3D line = sketch3D.SketchLines3D[5];
SurfaceBody surfBody = partComponentDefinition.WorkSurfaces[1].SurfaceBodies[1];

// Try directly with SketchLine3D
try
{
    splitFeatures.SplitBody(line, surfBody);
}
catch (Exception) { }

// Try creating a Path
try
{
    var path = partComponentDefinition.Features.CreatePath(line);
    splitFeatures.SplitBody(path, surfBody);
}
catch (Exception) { }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Many thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 17:00:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/9830529#M117395</guid>
      <dc:creator>Jo_Perturbable</dc:creator>
      <dc:date>2020-10-28T17:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a SplitFeature on a SketchLine3D and a SurfaceBody in C#?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10588324#M128351</link>
      <description>&lt;P&gt;did you ever solve this?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 18:46:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10588324#M128351</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-31T18:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a SplitFeature on a SketchLine3D and a SurfaceBody in C#?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10589864#M128370</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;Yes. We use &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-6FF4757E-48CD-443B-85A4-7A39B905E5BE" target="_blank" rel="noopener"&gt;SplitFeatures.SplitFaces&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Some C#-like pseudocode:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Path path = PartFeatures.CreatePath(SketchLine3D);
var objColl = TransientObjects.CreateObjectCollection();
objColl.Add(SurfaceBody.Faces[1]);
var split = splitFeatures.SplitFaces(path, false, objColl);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 08:37:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10589864#M128370</guid>
      <dc:creator>Jo_Perturbable</dc:creator>
      <dc:date>2021-09-01T08:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a SplitFeature on a SketchLine3D and a SurfaceBody in C#?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10590643#M128378</link>
      <description>&lt;P&gt;do happen to have any completed addins or ilogic code to share in regards to this?&lt;BR /&gt;&lt;BR /&gt;I am about to embark on working on this and could potentially save days of research and work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 13:52:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10590643#M128378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-01T13:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a SplitFeature on a SketchLine3D and a SurfaceBody in C#?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10590912#M128385</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp; No, sorry. I don't know iLogic and our full C# code is private.&lt;/P&gt;&lt;P&gt;You could use the SimpleAddIn and start from there. If you installed the DeveloperTools, it should be at C:\Users\Public\Documents\Autodesk\Inventor 2022\SDK\DeveloperTools\Samples\VCSharp.NET\AddIns\SimpleAddIn&lt;/P&gt;&lt;P&gt;I guess you already know where to look for the API anyway, but here is a link to the &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-841301D5-72AE-43B3-97D1-B119535D4BE4" target="_blank" rel="noopener"&gt;PartFeatures&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:33:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-do-a-splitfeature-on-a-sketchline3d-and-a-surfacebody-in/m-p/10590912#M128385</guid>
      <dc:creator>Jo_Perturbable</dc:creator>
      <dc:date>2021-09-01T15:33:17Z</dc:date>
    </item>
  </channel>
</rss>

