Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a hole feature that I would like to add a point to. I have some code that edits a sketch and adds a sketch point. but when I add that to the hole center points nothing happens. I can't seem to find anything else in the HoleFeature Object documentation on adding a point to a preexisting feature. The centerpoint seems to get added to the collection correctly, but no hole is drilled. What am I missing?
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oSketches As PlanarSketches = oDoc.ComponentDefinition.Sketches Dim oSketch As PlanarSketch = oSketches.Item("Holes") Dim oFeatures As PartFeatures = oDoc.ComponentDefinition.Features Dim oHoleCenterPoints As ObjectCollection = oFeatures.HoleFeatures.Item("Hole1").HoleCenterPoints Dim oTG As TransientGeometry = ThisApplication.TransientGeometry Dim oSketchPointCollection As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection() Dim oHeight As Double = InputBox("Enter height", "Do the height thing") Dim oPoint As Point2d = oTG.CreatePoint2d(1.75 * 2.54, (-LENGTH + oHeight) * 2.54) oHoleCenterPoints.Add(oSketch.SketchPoints.Add(oPoint, True)) MsgBox(oHoleCenterPoints.Count)
Solved! Go to Solution.