Cutting a Component in assembly

Hi :-)

I have an ejector pin in my mold, i want to cutting top of this pin by Core Surface.

please help me.

SolidworksApi macros