<?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 Deleting sketch points in derived sketch in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9003199#M71957</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on a 'configurator' for a tube heat exchanger. For this I generate a point cloud using XY coordinates. Then I add the points to a sketch in the 'Master' part. Lets say there are 500 points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the sketch is derived to the tubesheet part and used by a hole feature that consumes all centermark points. Until here all is going great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am testing the ability to change the tubesheet hole pattern and adding holes is also working great, but when a smaller tubesheet pattern is generated there are more point in the base sketch in the master than in the derived sketch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I delete these excessive points by code?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Dim oPatternSketch As PlanarSketch = _Tubesheet.ComponentDefinition.Sketches.Item("Tubesheet pattern")
        Debug.Print(oPatternSketch.SketchPoints.Count)
        For Each oPoint As SketchPoint In oPatternSketch.SketchPoints
            Debug.Print(oPoint.HasReferenceComponent)
            Try
                oPoint.Delete()
            Catch ex As Exception

            End Try

        Next&lt;/PRE&gt;&lt;P&gt;I can delete them by hand just by selecting and press delete, but when I use the code above they are generating a error..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2019 13:02:17 GMT</pubDate>
    <dc:creator>Jef_E</dc:creator>
    <dc:date>2019-09-03T13:02:17Z</dc:date>
    <item>
      <title>Deleting sketch points in derived sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9003199#M71957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on a 'configurator' for a tube heat exchanger. For this I generate a point cloud using XY coordinates. Then I add the points to a sketch in the 'Master' part. Lets say there are 500 points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the sketch is derived to the tubesheet part and used by a hole feature that consumes all centermark points. Until here all is going great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am testing the ability to change the tubesheet hole pattern and adding holes is also working great, but when a smaller tubesheet pattern is generated there are more point in the base sketch in the master than in the derived sketch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I delete these excessive points by code?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Dim oPatternSketch As PlanarSketch = _Tubesheet.ComponentDefinition.Sketches.Item("Tubesheet pattern")
        Debug.Print(oPatternSketch.SketchPoints.Count)
        For Each oPoint As SketchPoint In oPatternSketch.SketchPoints
            Debug.Print(oPoint.HasReferenceComponent)
            Try
                oPoint.Delete()
            Catch ex As Exception

            End Try

        Next&lt;/PRE&gt;&lt;P&gt;I can delete them by hand just by selecting and press delete, but when I use the code above they are generating a error..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 13:02:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9003199#M71957</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2019-09-03T13:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting sketch points in derived sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9004453#M71958</link>
      <description>&lt;P&gt;Hello Jef_E,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you upload the minimum data set that cause error with your code written in the 1st post?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 23:22:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9004453#M71958</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-09-03T23:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting sketch points in derived sketch</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9004853#M71959</link>
      <description>&lt;P&gt;You should update before trying to remove.. o wait thats my own questio lal&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 06:52:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/deleting-sketch-points-in-derived-sketch/m-p/9004853#M71959</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2019-09-04T06:52:49Z</dc:date>
    </item>
  </channel>
</rss>

