<?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 Sweep with selected edge in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sweep-with-selected-edge/m-p/10168781#M122394</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having a little issue with a Sweep function. Im selecting an edge in the part and need to use that edge as the path but i get a Type Mismatch. I tried to set the edge as a path (which is what the&amp;nbsp; sweep command is looking for) but then i get a 'Failed to createPath' error....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By selecting an edge or having an edge selected, how would i use the edge as the path or convert it to a path for the sweep function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Dim oEdge As Edge: Set oEdge = oApp.CommandManager.Pick(kPartEdgeFilter, "pick edge")
oEdgeSet.AddItem oEdge

Dim oPath As Path
Set oPath = oCompDef.Features.CreatePath(oEdge)

Dim oProfile As Profile
Set oProfile = oSketch.Profiles.AddForSolid

Dim spDef As SweepDefinition
Set spDef = oCompDef.Features.SweepFeatures.CreateSweepDefinition(kPathSweepType, oProfile, oPath, kCutOperation)

Dim sp As SweepFeature
Set sp = oCompDef.Features.SweepFeatures.Add(spDef)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do i need to convert the selected edge to something else? if so, what?&lt;/P&gt;&lt;P&gt;do i need to create a line in place of the edge? if so, how because i cant access the edge end points?&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;&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>Thu, 18 Mar 2021 23:42:14 GMT</pubDate>
    <dc:creator>NachitoMax</dc:creator>
    <dc:date>2021-03-18T23:42:14Z</dc:date>
    <item>
      <title>Sweep with selected edge</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sweep-with-selected-edge/m-p/10168781#M122394</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having a little issue with a Sweep function. Im selecting an edge in the part and need to use that edge as the path but i get a Type Mismatch. I tried to set the edge as a path (which is what the&amp;nbsp; sweep command is looking for) but then i get a 'Failed to createPath' error....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By selecting an edge or having an edge selected, how would i use the edge as the path or convert it to a path for the sweep function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Dim oEdge As Edge: Set oEdge = oApp.CommandManager.Pick(kPartEdgeFilter, "pick edge")
oEdgeSet.AddItem oEdge

Dim oPath As Path
Set oPath = oCompDef.Features.CreatePath(oEdge)

Dim oProfile As Profile
Set oProfile = oSketch.Profiles.AddForSolid

Dim spDef As SweepDefinition
Set spDef = oCompDef.Features.SweepFeatures.CreateSweepDefinition(kPathSweepType, oProfile, oPath, kCutOperation)

Dim sp As SweepFeature
Set sp = oCompDef.Features.SweepFeatures.Add(spDef)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do i need to convert the selected edge to something else? if so, what?&lt;/P&gt;&lt;P&gt;do i need to create a line in place of the edge? if so, how because i cant access the edge end points?&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;&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>Thu, 18 Mar 2021 23:42:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sweep-with-selected-edge/m-p/10168781#M122394</guid>
      <dc:creator>NachitoMax</dc:creator>
      <dc:date>2021-03-18T23:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sweep with selected edge</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sweep-with-selected-edge/m-p/10169143#M122401</link>
      <description>&lt;P&gt;Fixed it with a 3D sketch&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 05:40:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sweep-with-selected-edge/m-p/10169143#M122401</guid>
      <dc:creator>NachitoMax</dc:creator>
      <dc:date>2021-03-19T05:40:03Z</dc:date>
    </item>
  </channel>
</rss>

