File import plug-in - file has DimStyle.DimensionScale = 10 by default

I’m using Rhino 8 SR 3.

We have several file import plug-ins to support reading various file formats not natively supported by Rhino. When I read in a file through one of these plug-ins, I notice that the RhinoDoc supplied to the import method does not have any DimStyles, the count on that table is zero.

After the import is complete, however, the file has one DimStyle called “Default” with a DimStyle.DimensionScale=10.

What would be nice is if that DimStyle, that looks to be generated between the end of my import code, and Rhino showing the document to the user, has DimStyle.DimensionScale=1 for the style called Default. All templates that come with Rhino have DimensionScale=1, so I’m not sure why the imported file has a value of 10 all of a sudden.

Hi @menno,

After reading the non-3dm file, Rhino does some cleanup to ensure some of the tables have default objects. In the case of dimension styles, if the dimension style table is empty, then it add either ON_DimStyle::DefaultInchDecimal or ON_DimStyle::DefaultMillimeterSmall depending on the unit system specified.

In your case, I think the solution is to add your own dimension style so Rhino doesn’t have to.

– Dale