Text justification differs between versions?

I am writing a script that involves placing some text with rs.AddText , and I am using the optional justification argument 6 for the lower-right justification point.
I was not able to find the proper help guide, so the argument value was determined by trial and error.
I am using Rhino for Mac (5.4.2), but I am sharing it with someone using Rhino for Windows V6. The justification in his case looks like top-center.
I know there have been issues for this across versions, but can somebody point me to the correct instruction? Preferably for both versions as above, but at least the V6 list please.


Hi @maxz, i see this often, might be connected to various dimension styles as well. To control the justification, you might use below values which can be added together to make combinations:

1 = Left
2 = Center (horizontal) 
4 = Right 
65536 = Bottom 
131072 = Middle (vertical) 
262144 = Top


Thanks Clement.
I can see a rhytm in those numbers when I convert them to binary, all single bits set to 1 for bits 1,2 and 3, and for bits 17,18 and 19 :grinning:
I ran a little test earlier for aguments 0 to 9:

This confirms that the code is looking for those bits exclusively, anything not conforming is justified left-bottom as default. Except for the 6 somehow?

Another thing I found that, when you check the properties of the text object vs. the control point of that object, they don’t reflect the actual justification (both for the icons and the written text)

Oh well, at least I know now how to script to present the text properly. But it still does not explain the difference with Windows-V6. I will test it again, this time with a fully defined justification, both horizontal and vertical…


Looks like 1 takes priority over 4 and both 1 and 4 take priority over 2. If none of those bits are set (e.g. 0 and 8) then it is left justified

Ok, I ran a new test, this time with the full argument as per Clement’s list:

Looks fine, and also the properties of the created text objects are in sync as far as the justification-icons are concerned. The description is still erratic.

I am waiting for a confirmation from a V6 Windows user to see if everything is now consistent.


Edit: V6 consistency is now confirmed, the issue is resolved as far as I am concerned.

Hi @maxz, i think there is probably a glitch in windows too. i’ve seen different results of rs.AddText justification depending on the dimensionstyle used. If the justification was not explicitely set to lower left, i had different outcome for “Default” and “Millimeter Small” dim style.

Yes, always defining it is recommended.