I have a sketch block with several sketch lines / points in it.
I want to get the sketch when user selects sketch lines or points of it.
But I donnot know when the user will select, so I cannot set the Selection Filter.
So, any method to get the sketch block when I get the selected line or point which belongs to the block?
Thanks very much for your tips!

A SketchSegment has an ID but the ID is only unique within a sketch. A SketchBlockInstance has a SketchBlockDefinition and underlying sketch. You could use a combination of the ID and the coordinates and check each top level sketch's SketchBlockInstance, then its SketchBlockDefinition to get the sketch and compare segment IDs and coordinates there until you find the one in-hand.
Thanks for your tips.
I considered this way and I'm not sure that works.
Because when I select a sketch line, I don't think I can get its ID in the SketchBlockDefinition it belongs, but the ID in the top sketch of ModelDoc.
So matching the ID in top sketch with the ID in sketch of SketchBlockDefinition or SketchBlockInstance may not work.
Any other tips?
Still waiting for good ideas...
My suggestion on 12/29 works. I had some time so I tested this and have attached a VBA macro and part document demonstrating it. Please test it and let me know if it is a good solution for you. The combination of sketch segment ID and sketch segment curve coordinates (I used a spline in the example) allows the macro to accept or reject the similarly ID'd (but in different sketch blocks) splines to find the correct one. There are testing directions at the top of the macro. I would appreciate feedback here, if valuable to you, I will post it to the SolidWorks forum for other users to download.
Yes, you are right.
ID and coordination can identify the segment or point in a sketch block.
The theory works in a drawing.
Thank you so much!