Offset macro to longer curve

Is it possible to create a macro with ‘Offset’, where the output is always the longer curve?

Currently my macro gets stuck if I don’t tell it which side to offset to. I know I always need the side which will result in the longer curve or (closed) polyline. This is fairly straightforward in Grasshopper, but I’m looking for something specifically for Rhino alone, to work into my workflow.

So far I’m helping myself by using the “BothSides” option, as that is happy to not receive a mouse-click. But it creates redundant geometry that is of course quite messy.

Many thanks

I think this will only be possible with a script (or GH as you already did).