How to delete a slot with API?

Hi folks,

it seems like a simple question (maybe it is), but I was not able to select an ISketchSlot and delete it.

Tried in C#...

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

ISketchSlot slot;

(slot as ISketchSegment).Select(false);

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

Casting 'slot' to an ISketchSegment gives back null.

Any help would be great

Thank you

SolidworksApi macros