Get Feature or Feature ID from selected sketch entity

Hi all,

I need to the feature or feature ID of the sketch that contains a sketch entity I have selected.

For example, Sketch1 in my tree as a Spline. When I click this spline and run the macro, I would like to be able to have Sketch1 returned or the feature number of sketch1. Is there an API for this? I couldn't find one that works with sketch entites, I may be mistaking however.

Thanks,

Marc

SolidworksApi macros