When I try to use SetToFaceExtent on a HoleFeature, then it keeps returning error. What shall I do?
This is as designed. To set the Face - which is a BRep input - to the Hole Feature, the stop node has to be moved above the Hole Feature. This is required for any Feature edit that involves a BRep input. On moving the stop node above the Hole Feature the call to SetToFaceExtent succeeds even with a Face as input.
Sub SetToFaceExtentTest(ByVal app As Inventor.Application)
Dim doc As PartDocument = app.ActiveDocument
Dim hf As HoleFeature = app.CommandManager.Pick(
"Select hole feature:")
If hf Is Nothing Then
Dim face As Face = app.CommandManager.Pick(
"Select planar face:")
If face Is Nothing Then
Catch ex As Exception