[RhinoCommon] Default template not used when opening a file

I was kind of hoping that when a user selects a file that gets opened by our file import plug-in that the settings from the default template file would be used to initialize the document being read (esp. the unit system). (the default template being the one configured in Tools : Options : Files : Template files : Default )

Unfortunately, as far as I can see, the unit system of a document being opened is always millimeters, independent of the template configured.

When importing, you are presented with a new, empty document. The default unit system for a new, empty document is millimeters.

This is not enough when rhino opens non-3dm files (i.e. DXF) directly from windows explorer, it seems to apply settings that user has no control over.

@vano_artful - thanks for reopening a 12 year old thread…

What does this mean?

– Dale

Unfortunately, 12 years later it still relevant and not fixed…default template not used for documents that don’t have document settings, which doesn’t make any sense.
And I can’t find any way to apply a template to already opened document. Even with python script I can’t make it apply grid/units settings from a template.

Hi @vano_artful,

There is nothing to fix.

We do not assume settings for non-3dm files. For example, AutoCAD files are unitless - they have no unit system. If we were to assume all unitless files were in millimeters, for example, we would be wrong much of the time. Thus, we leave completing the document setup to the user, or the scripter in this case.

If you know the implied unit system of the AutoCAD file you intend to open, you can open a new .3dm file based on an existing template, with the setting you want, and then import your AutoCAD file into it.

If you choose to just open the file, then it’s your responsibility to complete the document setup.

– Dale

And what harm would it do apply default template to unitless documents? That’s the whole point of having default document settings…
If it’s wrong, then user would have to complete the document setup anyway, but rhino forcing non-configurable defaults that are 100% of the time wrong for users who’s dealing with different units.

How is that “nothing to fix”? I’m sure it’s “by design” but it doesn’t mean it’s “correct”…

Hi @vano_artful,

The fix for you is to create a new file based on the template of your choice. Then import your AutoCAD file.

– Dale

That’s a work around, not a fix. That means I can’t open client’s dxf file directly from email or zip file.

Have your customers send you .3dm files.

– Dale