How to draw ruler?

I take it that you mean a sample? The manual page that I linked to above has part of a small sample, I believe. Have you tried building something based on that?

To some degree, I think that how Meshdrawer is used depends on what you want it to do. For example, if you want the generated geometry to be updated every frame then you might want a task, as shown on the manual page; on the other hand, if you want to generate the geometry once and leave it largely unchanged then you might want to manually call the method that you create to “draw” you Meshdrawer geometry, and then simply move, scale, rotate, etc. the Meshdrawer NodePath as you would any other.