I’ve been drafting plans in international units, and the convention seems to be to give dimensions in millimeters. Per ISO, 10 meters (10 000 mm) is to be written 10 000, not 10,000mm as in US convention.
Is there any way to get Rhino to do this?
I’ve been drafting plans in international units, and the convention seems to be to give dimensions in millimeters. Per ISO, 10 meters (10 000 mm) is to be written 10 000, not 10,000mm as in US convention.
Is there any way to get Rhino to do this?
You can customize annotation styles under Options, Annotation Styles
what you re asking for is to set the “thousands separator”
see also those 2 topics:
EDIT:
there might be some workaround with using an additional line (a rhino object), and textfields with format
%<'{:0.3f}'.format(CurveLength("459884e9-fc3b-44ed-b7e2-7dcff614d019"))>%
But I did not find any approach that is supported by Rhino s textfields that allows to set " " as thousands separator.
EDIT 2:
further digging: … if it is really a must have, a custom script can set a static Text with the desired format - but this will kill the associative / dimension history. So this might be a pre-print step and then after printing / export going back to the last version with standard interactive dimension/annotations. a bit of a hassle
Thanks. I’ve submitted a formal RFE to tech support.
It’s not critical for this sketch, though millimeter dimensions look rotten without it, but if I intend to produce actual CDs for use in a country that uses international units, I will need it.
So far, I can’t get that to work; I can’t figure out what argument to give to CurveLength(),
Depending on the version of format() used, I think {:0,.3f}
might produce commas, {:0_.3f}
might produce underscores, and {:0n.3f}
might produce a locale-aware thousands separator, but there doesn’t seem to be any way to say “use the ISO 129 convention.”
You could format the annotations in Grasshopper… The definition references annotations and overwrites those which aren’t formatted yet
annotation_format_cache.3dm (70.1 KB)
annotation_format_cache.gh (19.8 KB)
This has been accepted as a feature request, but it may not arrive until Rhino 9.
Hi R -
Nathan tells me that you can format a number with the comma thousands separator and then replace that comma with a space:
%<'{:,}'.format(CurveLength("6a3d576f-a00c-44c1-8adc-c6e4ae0fff78")).replace(',', ' ')>%
-wim
That’s a good idea, but I’ve smashed into this bug: https://mcneel.myjetbrains.com/youtrack/issue/RH-68249, and almost nothing I write in the dimension’s “text” property will reliably be displayed.