- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
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.
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.
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.
How can I delete these excessive points by code?
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
NextI can delete them by hand just by selecting and press delete, but when I use the code above they are generating a error..
Please kudo if this post was helpfull
Please accept as solution if your problem was solved
Inventor 2014 SP2
Solved! Go to Solution.