I've managed to get something working for cutting a rectangular slot within a solid block. However, the slot is slicing the in two pieces. I assinged the top face tag to the "RPO Contraints"
Here's the snippet of code:
Dim loc(2) As Double
loc(0) = iOrigin.X
loc(1) = iOrigin.Y
loc(2) = iOrigin.Z
Dim tool_axis(2) As Double
tool_axis(0) = iAxis.X
tool_axis(1) = iAxis.Y
tool_axis(2) = iAxis.Z
Dim directon(2) As Double
directon(0) = iDirection.X
directon(1) = iDirection.Y
directon(2) = iDirection.Z
Dim features As NXOpen.Tag
features = Nothing
theUFSession.Modl.CreateRectSlot(loc, tool_axis, directon, Width.ToString(), Depth.ToString(), Length.ToString(), TopFace.Tag, TopFace.Tag, BtmFace.Tag, features)
Dim featName As String = Nothing
theUFSession.Modl.AskFeatName(features, featName)
Dim bodyFeature1 As Features.BodyFeature = CType(workpart.Features.FindObject(featName), Features.BodyFeature)
Return bodyFeature1