How to create custom dimension?

Hello everyone, is it possible to create your own annotation type using RhinoCommon, such as a height annotation, similar to this one? What work needs to be done?

I inherited from Dimension and then referred to the LinearDimension class. I found that there are some methods that are UnsafeNativeMethods. What should I do?