How to retrieve custom units value

Hi,

I’m trying to implement own unit converter in my plugin for Rhino 7. And I have stuck with CustomUnits. As I understand there should be appropriate class that contains name and UnitsPerMeter value. But I couldn’t find it. Does someone know how it can be solved?

P.S. Also, I tried using RhinoMath.MetersPerUnit() and RhinoMath.UnitScale() methods to get factor value for CustomUnits, but it doesn’t work and it always return one.

Hi @mamarchenko,

I don’t see a way of getting or setting a custom unit system in RhinoCommon. I’ve logged the issue.

https://mcneel.myjetbrains.com/youtrack/issue/RH-64801

– Dale

Hi @dale

Thanks. I will be looking forward resolving this issue.