How to make the ruler longer like this picture

Any script will be helpful!

I don’t think that is exposed in python. You can have a look at the C++ code to get an idea how the ruler is calculated and what parameters are available.

The ruler is short to not interfere with corner annotations. The implementation should take the corner annotations into account (only make it wide if there is space; or shift things around the avoid overlap).

1 Like


change to code

double rulerPreferredLengthPixel = double(viewWidthPixel)/4.0;
to
double rulerPreferredLengthPixel = double(viewWidthPixel)/1.4;

will make the ruler longer