<?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: Modifying an existing sketch arc using VBA in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13227190#M175050</link>
    <description>&lt;P&gt;Moving the arc by manipulating the sketch points seems possible:&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim otg = ThisApplication.TransientGeometry
Dim doc As PartDocument = ThisDoc.Document

Dim sketch As Sketch = doc.ComponentDefinition.Sketches.Add(doc.ComponentDefinition.WorkPlanes.Item(1))
sketch.Edit()
Dim arc1 = sketch.SketchArcs.AddByCenterStartEndPoint(otg.CreatePoint2d(0, 0), otg.CreatePoint2d(10, 0), otg.CreatePoint2d(0, 10), True)
Dim arc2 = sketch.SketchArcs.AddByCenterStartEndPoint(otg.CreatePoint2d(-1, -1), otg.CreatePoint2d(9, -1), otg.CreatePoint2d(-1, 9), False)

MsgBox("Now move.")
arc1.CenterSketchPoint.MoveTo(otg.CreatePoint2d(1, 1))
arc1.StartSketchPoint.MoveTo(otg.CreatePoint2d(11, 1))
arc1.EndSketchPoint.MoveTo(otg.CreatePoint2d(1, 11))&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 23 Dec 2024 15:06:28 GMT</pubDate>
    <dc:creator>JelteDeJong</dc:creator>
    <dc:date>2024-12-23T15:06:28Z</dc:date>
    <item>
      <title>Modifying an existing sketch arc using VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13224840#M175041</link>
      <description>&lt;P&gt;I have the need to update an existing sketch arc via VBA.&amp;nbsp; I cannot delete and replace it as I have downstream dependencies.&amp;nbsp; I am almost able to accomplish it by constraining the start, center, and end points to sketch points (based on work points) and then programmatically modifying the locations of the work points - which works except when the curve direction of the arc (left or right) flips.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While I am able to harvest all the information about the existing arc using "SketchArc" I do not see any way to update the definition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone provide any ideas or direction on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks;&lt;/P&gt;&lt;P&gt;Nickl&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2024 05:35:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13224840#M175041</guid>
      <dc:creator>nick.seman</dc:creator>
      <dc:date>2024-12-22T05:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an existing sketch arc using VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13225457#M175043</link>
      <description>&lt;P&gt;The properties of an arc seem to be read-only so that means there is no way to change an arc. But you can create a new arc (using the properies of the old arc.) and then delete the old arc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the fuction to create an arc has a optional (boolean) paramater to tell Inventor to draw the arc clock or counter clock wise. In the following example I draw 2 arcs. the first is clockwise and the other countercockwise. Notice the boolean at the end of line 6 and 7.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim otg = ThisApplication.TransientGeometry
Dim doc As PartDocument = ThisDoc.Document

Dim sketch As Sketch = doc.ComponentDefinition.Sketches.Add(doc.ComponentDefinition.WorkPlanes.Item(1))
sketch.Edit()
Dim arc1 = sketch.SketchArcs.AddByCenterStartEndPoint(otg.CreatePoint2d(0, 0), otg.CreatePoint2d(10, 0), otg.CreatePoint2d(0, 10), True)
Dim arc2 = sketch.SketchArcs.AddByCenterStartEndPoint(otg.CreatePoint2d(-1, -1), otg.CreatePoint2d(9, -1), otg.CreatePoint2d(-1, 9), False)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2024 14:40:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13225457#M175043</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-12-22T14:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an existing sketch arc using VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13226064#M175046</link>
      <description>&lt;P&gt;That is pretty much what I had arrived at as well.&amp;nbsp;&amp;nbsp; Problem is that it breaks my downstream processes if I create a new arc and delete the exisitng.&amp;nbsp; I think I might be able to change my approach to manipulating the work points' locations that the existing arc follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking at it for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 02:00:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13226064#M175046</guid>
      <dc:creator>nick.seman</dc:creator>
      <dc:date>2024-12-23T02:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an existing sketch arc using VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13227125#M175049</link>
      <description>&lt;P&gt;Could you demonstrate with maybe pictures what you try to modify?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 14:13:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13227125#M175049</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2024-12-23T14:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an existing sketch arc using VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13227190#M175050</link>
      <description>&lt;P&gt;Moving the arc by manipulating the sketch points seems possible:&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim otg = ThisApplication.TransientGeometry
Dim doc As PartDocument = ThisDoc.Document

Dim sketch As Sketch = doc.ComponentDefinition.Sketches.Add(doc.ComponentDefinition.WorkPlanes.Item(1))
sketch.Edit()
Dim arc1 = sketch.SketchArcs.AddByCenterStartEndPoint(otg.CreatePoint2d(0, 0), otg.CreatePoint2d(10, 0), otg.CreatePoint2d(0, 10), True)
Dim arc2 = sketch.SketchArcs.AddByCenterStartEndPoint(otg.CreatePoint2d(-1, -1), otg.CreatePoint2d(9, -1), otg.CreatePoint2d(-1, 9), False)

MsgBox("Now move.")
arc1.CenterSketchPoint.MoveTo(otg.CreatePoint2d(1, 1))
arc1.StartSketchPoint.MoveTo(otg.CreatePoint2d(11, 1))
arc1.EndSketchPoint.MoveTo(otg.CreatePoint2d(1, 11))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Dec 2024 15:06:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/modifying-an-existing-sketch-arc-using-vba/m-p/13227190#M175050</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-12-23T15:06:28Z</dc:date>
    </item>
  </channel>
</rss>

