Scaling dimension text size in detail view with Rhinocommon

Hi @dale, I want to change the scale of text sizes only in detail view. Using the code below didn’t help:

bool scaled = detail.DetailGeometry.SetScale(1.5, doc.ModelUnitSystem, 1, doc.PageUnitSystem);

When I change the model scale of dimensions nothing changes in the detail view. The only way is to change the height of the dimension texts but that causes problems in the model. Is there any way to change text sizes only in the detail view with rhinocommon?

Hi Tahirhan,
Sorry for the delay. @dale asked me to talk about how this works from the Rhino, and then you two can hammer out the details with RhinoCommon.

The Model scale setting in the Annotation style only affects dimension and text in the Model space viewport.
Why: With “layout space scaling” on for the model, Annotations are display 1:1 on the layout. However if you switch to the Model viewport, in architectural or site model, the dimensions would not be readable. So the Model Space scale steps in to help with that. So I can scale the 1mm text by a model scale of 10, and the test will be displaying at 1mm x 10, 10mm high in the model.

It can be turned on or off in the model, in Options → Document Properties → Annotation.
Model Space Scaling. This is a “per model” setting.

It the Layout space scaling is Off, and Model space scaling is On, then the Model scaling factor that is set in the annotation style is being used in Model viewport, will also be shown on the layout.
What does this look like?
Details of different scales display annotation text and dimension that are different sizes, depending on the detail scale. This turn out to be the best combination when importing DWG files to Rhino.

Without the model, I will guess that the Enable Model Scale needs to be checked and the Enable Layout Scale need to be unchecked for you to see the changes in the Model scale in model and layout details.

Give that a try and if you continue to have issues, please post a file that we can look at.
Mary Ann Fugier


Hi @mary, A college from the office recommended the same way and it worked! thank you for the answer! It solved the issue after unchecking the “Layout Scale” and checking the “Model Scale”. By looking to document features I found those two below and fixed the issue from the RhinoCommon side:

RhinoDoc doc = RhinoDoc.ActiveDoc;
doc.ModelSpaceAnnotationScalingEnabled = true;
doc.LayoutSpaceAnnotationScalingEnabled = false;