C#, RhinoCommon, annotation style and gumball

Hello List,

I would like to code the equivalent style settings as I would do through the command line with the command: “-_DocumentProperties …” my code is this:

DimensionStyle ds = RhinoDoc.ActiveDoc.DimStyles.CurrentDimensionStyle;
            ds.LengthResolution = (int)1.1;
            ds.AngleResolution = (int)1.1;
            ds.TextHeight = 2;
            ds.TextGap = .25;
            ds.ExtensionLineExtension = 3.5;
            ds.ExtensionLineOffset = 1.9;
            ds.LeaderArrowLength = 3.1;
            ds.ArrowLength = 2.2;
            ds.CenterMarkSize = 2.1;
            ds.TextAlignment = TextDisplayAlignment.Normal; //Normal Horizontal  AboveLine InLine
            ds.LengthFactor = 4.1;
            ds.LengthFormat = DistanceDisplayMode.Feet; // Decimal Feet FeetAndInches
            ds.FontIndex = fontIndexByName("@Gulim");  // doesn't change font
            ds.LeaderArrowLength = 29.5;
            // EliminaEst1 non trovato in doc
            // EliminaEst2 non trovato in doc
            // FormatoAngolare non trovato in doc
            // ds.ArrowType  documented but symbol not found

but I’m facing some problems:

  1. The property “ArrowType” is documented but not found by the compiler
  2. The fontIndex property doesn’t change the font
  3. I could not find the removeExtension and angular format settings that I can find in the user interface

Plus I would like to find an example on how to get the gumball appearance like colors and so on as I would do through the command “-_options / modellingAids / Gumball …”. I’ve just been able to activate the gumball with this:

Rhino.ApplicationSettings.ModelAidSettings.AutoGumballEnabled = true;

Thanks. Livio


I’m already doing it with “RunCommand”, but I would like to avoid it


Hi Livio,

What service release of Rhino are you running? (Help -> About…)

– Dale

Version 5 SR11 32-bit (5.11.50226.17195, 2/26/2015)