Hi,
Sorry for that but I do it.
Now only problem for me is how to measure diameter of the hole ??

Actually in code I use inputBox but it's not that what I' expected 🙂
Below my code:
Public Sub Main()
oPath = "C:\FASOLKA.ide"
oDefault = "8"
Dim oPartDoc As PartDocument
oPartDoc = ThisApplication.ActiveEditDocument
Dim oPartDef As PartComponentDefinition
oPartDef = oPartDoc.ComponentDefinition
' Get the selected face to use as input for the iFeature.
Dim oFace As Face
oFace = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Wybierz płaszczyzne na której powstanie fasolka")
'Wybierz otwór 1
Dim oOs1 As Object
oOs1 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceCylindricalFilter, "Wybierz otwór 1")
'Wybierz otwór 2
Dim oOs2 As Object
oOs2 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceCylindricalFilter, "Wybierz otwór 2")
Dim oFeatures As PartFeatures
oFeatures = oPartDef.Features
' Create an iFeatureDefinition object.
Dim oiFeatureDef As iFeatureDefinition
oiFeatureDef = oFeatures.iFeatures.CreateiFeatureDefinition(oPath)
' Set the input.
Dim oInput As iFeatureInput
For Each oInput In oiFeatureDef.iFeatureInputs
Dim oParamInput As iFeatureParameterInput
Select Case oInput.Name
Case "OS 1"
Dim oOs1Input As iFeatureEntityInput
'Dim oPlaneInput As iFeatureSketchPlaneInput
oOs1Input = oInput
oOs1Input.Entity = oOs1
Case "OS 2"
Dim oOs2Input As iFeatureEntityInput
'Dim oPlane1Input As iFeatureSketchPlaneInput
oOs2Input = oInput
oOs2Input.Entity = oOs2
Case "PŁASZCZYZNA"
Dim oPlaneInput As iFeatureWorkPlaneInput
'Dim oPlane1Input As iFeatureSketchPlaneInput
oPlaneInput = oInput
oPlaneInput.PlaneInput = oFace
Case "SREDNICA"
oSrednica = InputBox("Wpisz srednice fasolki","SREDNICA", oDefault)
oParamInput = oInput
oParamInput.Expression = oSrednica
End Select
Next
' Create the iFeature.
Dim oiFeature As iFeature
oiFeature = oFeatures.iFeatures.Add(oiFeatureDef)
End Sub
Thanks,
ralfmj