Current model unit system accessible by Hops function

Hi there!

I’m currently discarding some of my clusters in favor of hops functions, but I have one issue. One of my clustered definitions relies on a bit of (clunky) python inside to access the current model unit system and scale the results properly. I hadn’t considered this before trying, but hops seems to only want to access a default unit system (I’m guessing it’s meters, since that’s the only result returned).

Beyond manually passing that information through as an integer or string and using a lookup inside the function, is there any current way to pass hops your current working unit system? Some sneaky Get parameter somewhere?

Thanks in advance!

For now, here’s how I’m solving this problem. I have a simple python script fetching the unit system, which returns an integer, and passing that into my Hops function manually along with the value I need to convert.

Inside the Hops function, I’m making use of the rhinoscript UnitScale method to handle the math and pass it back out.

@stevebaer if there was a Get parameter available in Hops that could fetch the unit system, it would sure make this cleaner!