Is a macro to automatically do Surface Boundaries possible?

I have one sketch that has about 50+ lines in it. I have other sketches with different amounts in different files I want this to work with too. I'm just curious if this is possible.
Would it be possible to have a macro that would automatically make surface boundaries between each line with no reference lines(where the sketch could differ in placement of the lines). I've looked at the sample surface boundary API code but it doesn't make sense to me and they are using specific edge points in the area where they declare what lines are going to have a surface boundary between them.

SolidworksApi macros