"how do I achieve the function of "select open loop

Hello All,

how do I achieve the function of SELECT OPEN LOOP. this function is needed while selecting

.edges of surfaces

.thank you.

SolidworksApi macros