About REFSURFACE in C#

I need to insert a offsetsurface of a " REFSURFACE " which I inserted using InsertPlanarRefSurface() .

I get a API sample from SW in VBA below

Sub main()

Set swApp = _

Application.SldWorks

Set Part = swApp.ActiveDoc

boolstatus = Part.Extension.SelectByID2("", "EDGE", 0.00645152344201, -0.02252514488873, -0.04027607412763, True, 0, Nothing, 0)

Part.ClearSelection2 True

boolstatus = Part.Extension.SelectByID2("", "EDGE", 0.00645152344201, -0.02252514488873, -0.04027607412763, False, 1, Nothing, 0)

Part.ClearSelection2 True

boolstatus = Part.Extension.SelectByID2("", "EDGE", 0.00645152344201, -0.02252514488873, -0.04027607412763, False, 1, Nothing, 0)

boolstatus = Part.InsertPlanarRefSurface()

Part.ClearSelection2 True

boolstatus = Part.Extension.SelectByID2("", "FACE", 0.002650717582966, 0.003599192305103, -0.04000000000008, True, 0, Nothing, 0)

Part.ClearSelection2 True

boolstatus = Part.Extension.SelectByID2("", "FACE", 0.002650717582966, 0.003599192305103, -0.04000000000008, False, 1, Nothing, 0)

End Sub

as you can see in VBA the REFSURFACE was selected as " FACE " , but when I use the nearly same way in C# to select the REFSURFACE, I always get false.

boolstatus = swModelDocExt.SelectByID2(name1, "FACE", 0, 0, 0, true, 0, null, 0);    //name1 is the name of RefSurface I inserted     get false

swModel.ClearSelection2(true);

boolstatus = swModelDocExt.SelectByID2(name1, "FACE", 0, 0, 0, false, 1, null, 0);   //get false

swModel.InsertOffsetSurface(thick, reverse);                        //nothing was inserted after this

can anyone help?

SolidworksApi macros