Code:
Dim oSelected As Object
Dim cSelect As New clsSelect Dim oInput As iFeatureInput
oInput = oiFeatureDef.iFeatureInputs.Item(n)
' die verschiedenen geometrischen Eingabetypen
Dim oEntityInput As iFeatureEntityInput
Dim oSketchInput As iFeatureSketchPlaneInput
Dim oVectorInput As iFeatureVectorInput
Dim oWorkplaneInput As iFeatureWorkPlaneInput
oEntityInput = TryCast(oInput, iFeatureEntityInput)
oSketchInput = TryCast(oInput, iFeatureSketchPlaneInput)
oVectorInput = TryCast(oInput, iFeatureVectorInput)
oWorkplaneInput = TryCast(oInput, iFeatureWorkPlaneInput)
If Not oWorkplaneInput Is Nothing Then
' Arbeitsebene
oSelected = cSelect.Pick(SelectionFilterEnum.kWorkPlaneFilter, _
oInput.Prompt, _
CursorTypeEnum.kCursorBuiltInSelectArrow)
If oSelected Is Nothing Then
Exit Sub
End If
Dim oWP As WorkPlane
oWP = oSelected
....
oWorkplaneInput.PlaneInput = oWP <- Unbekannte Ausnahme (HRESULT=E_FAIL)
End If
If Not oEntityInput Is Nothing Then
Select Case oEntityInput.EntityType
Case 360784
'Arbeitsachse
oSelected = cSelect.Pick(SelectionFilterEnum.kWorkAxisFilter, _
oInput.Prompt, _
CursorTypeEnum.kCursorBuiltInSelectArrow)
If oSelected Is Nothing Then
Exit Sub
End If
oWAxis = oSelected
oEntityInput.Entity = oWAxis <- Funktioniert
Case 39
'Arbeitspunkt
....
End Select
End If