Hole Feature sketch point IsParamOnFace not returning

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to deterimne if a hole feature sketch point is on the planar face. When I run this with a sketch that is not consumed by a Hole feature all returns correct. when I consume the same sketch with a hole feature it does not work correctly. Can anyone instruct me on why or what is incorrect below?
Public Sub CheckHolePoint()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
' Set a reference to the component definition.
Dim oDef As PartComponentDefinition
Set oDef = oPartDoc.ComponentDefinition
Dim oSketch As PlanarSketch
For Each oSketch In oPartDoc.ComponentDefinition.Sketches
If TypeOf oSketch.PlanarEntity Is Face And (oSketch.Adaptive) Then
Dim oFacePlane As Face
Set oFacePlane = oSketch.PlanarEntity
Dim oSKPoint As SketchPoint
Dim oPoint As Point
For Each oSKPoint In oSketch.SketchPoints
Dim oSE As SurfaceEvaluator
Set oSE = oFacePlane.Evaluator
Dim oCords(1) As Double
oCords(0) = oSKPoint.Geometry.X
oCords(1) = oSKPoint.Geometry.Y
Debug.Print "IsParam: " & oSE.IsParamOnFace(oCords)
Next
End If
Next
End Sub