Dimension Size and Font

Is there currently no way to set the font and size of linear dimensions created with the API?

If this is the case it is a serious limitation? Are there any successful workarounds?

It appears that when I create dimensions the font and size default to the model settings found in the Model Info tab. Perhaps there is a way to set the overall model dimensioning atttributes within the API?

Correct, and there never has been via the Ruby API.

Others have agreed and said so, and requested this be added to the Ruby API for many years.

Discussed in these forums in Feb of 2015 …

And again later that year in November of 2015 …

Officially requested in the official issue tracker in February of 2018 …
(… although it has been requested and logged long before even 2015.)

Note also discussion threads in this category and issue filed specifically for leader text object font access. (Please search and add comments. Ask to unlock threads if needed.)

Not with the Ruby API. There is actually no Sketchup::OptionsProvider instance yet implemented for the “DimensionOptions” (seen in the Model Info dialog.)

I just logged an issue for this (just in case it’s been overlooked) …

The SketchUp C API does actually have these methods to get and set dimension fonts, but last I heard from @thomthom, he said using the C API on a live model was unsafe.

So I can’t say if there are actually any workarounds.

There is an ugly workaround which I think I posted here last year but cannot find it now.
I used it for variable sized dimension text in my 2DXY SiteSurvey Extension.
See the first part of this video to see how it works:

To get this to work I first stored a single dimension with each font size I wanted (30 of them) in separate skp files (version 16 for backward compatibilty). These are in the resources subfolder of the extension. My ruby code decides from the length of the dimension which size text it needs, and inserts the correct skp as a component, which is then exploded and repositioned using the ruby methods supported.