Thanks . I tried my best. But it's buggy, I don't fix them. I am using Inventor 2019 so I can't open your file. I send you my file. Can you check it out for me? Rules = iFeature
code
Dim oPartDoc As PartDocument
oPartDoc = ThisApplication.ActiveDocument
Dim oPartDef As PartComponentDefinition
oPartDef = oPartDoc.ComponentDefinition
Dim oPlane As WorkPlane = oPartDef.WorkPlanes.Item("YZ Plane")
Dim oPoint As WorkPoint = oPartDef.WorkPoints.Item("Center Point")
Dim oFeatures As PartFeatures
oFeatures = oPartDef.Features
Dim oiFeatureDef As iFeatureDefinition
oiFeatureDef = oFeatures.iFeatures.CreateiFeatureDefinition("C:\Users\Public\Documents\Autodesk\Inventor 2019\Catalog\TAVO\LINK PIPE\DN125SCH40.ide")
Dim oInput As iFeatureInput
For Each oInput In oiFeatureDef.iFeatureInputs
Dim oParamInput As iFeatureParameterInput
Select Case oInput.Name
Case "Plane1"
Dim oPlaneInput As iFeatureSketchPlaneInput=oInput
oPlaneInput.PlaneInput = oPlane
Case "Point1"
Dim pointInput As iFeatureEntityInput = oInput
pointInput.Entity = oPoint
Case "Angle_position"
oParamInput = oInput
oParamInput.Expression = "90 deg"
Case "Lenght_pipe"
oParamInput = oInput
oParamInput.Expression = "200 mm"
Case "Position_hold"
oParamInput = oInput
oParamInput.Expression = "500 mm"
Case "R_tank"
oParamInput = oInput
oParamInput.Expression = diameter/2
Case "Thick"
oParamInput = oInput
oParamInput.Expression = Thickness
End Select
Next
Dim oiFeature As iFeature
oiFeature = oFeatures.iFeatures.Add(oiFeatureDef)