macro to extend REFSURFACES plane. InsertExtendSurface

I am writing a piece of code to automatically  Select swSelREFSURFACES surface type and extend it to a distance.

I am using InsertExxtendSurface.


In the help page of  InsertExtendSurface it says: The selection list can contain faces or edges from the surface.

Bellow is the code using two ways of selection that select the surface but it does not extend it.

Maybe because I am not selecting the face that the InsertExtendSurface requires.


How to select a face from a surface?


Thanks

-------------- First selection--------------------------

Set Part = swApp.ActiveDoc

boolstatus = Part.Extension.SelectByID2("surface1", "SURFACEBODY", 0, 0, 0, False, 0, Nothing, 0)

Part.InsertExtendSurface True, 0, 0.356362

--------------------------------------------------------

----------Second Selection-----------------------

Set Part = swApp.ActiveDoc

boolstatus = Part.Extension.SelectByID2("surface1", "REFSURFACE", 0, 0, 0, False, 0, Nothing, 0)
Part.InsertExtendSurface True, 0, 0.356362

SolidworksApi macros