How do I get all the loops in the sketch?


I used ISketch =>GetSketchRegions=>GetFirstLoop,
I get all the loops but I get holes 1,2, and 3 in the diagram, I just want 1, 2, what do I do

I solved it
varSketchSegments = (object)swSketch.GetSketchSegments();
Use this api to find all SketchSegments and GetEdges in the loop.
If the points are the same, then the loop is the one I want.