Display modes import issues

Hi!
I am struggling with importing display modes. I can see the option to import, but when I choose the file, nothing happens. I am trying to import the .ini file originally created on windows platform.

same problem

Having the same problem!

Hi - it looks like we’ve had this issue on the list for a while - RH-49144.
I’ve added this thread to be notified when it gets fixed.
-wim

Thanks @wim wim :slight_smile:

Bump. I’m still having this issue. Specifically, I am trying to import my Display Modes from V6 into a WIP build, so that I am working on an identical feeling version.

Thanks,

Same issue!

This is not currently possible.
It’s on the list:
https://mcneel.myjetbrains.com/youtrack/issue/RH-49144

Hi! I am trying to import an .ini file also into my Display Modes on a mac Rhino 7. My remote team member working on a PC says it should have imported but hasn’t. Please is there a way to get this to work on a mac?

This is only directly possible between Windows Rhinos.
Mac Rhino does not have all of the same tools available so making this work cross-platform is quite complicated.

So to be clear, should display mode imports/exports between computers now work on Windows Rhino?

You have always been able to export and import display mode INI files between the same versions of Rhino for Windows.

Hello - this is just plain broken for at least some ini files,
RH-49144 Import ini file fails

-Pascal

Okay gotcha, so V6 to V7 won’t work then.

Hey everyone,

if you’re seeing this issue it may be due to the way Windows stores UTF-8 and UTF-16 encoded files compared to how those files are stored and read on unix systems (macOS, Linux).

Windows uses a BOM, or Byte Order Marker, in order to specify that a file is UTF-8 or UTF-16 vs another possible encoding. These bytes will cause Rhino for Mac to fail to parse an ini file that has been exported from Windows and thus contains it. You can test this for yourself on macOS:

# From a terminal, assuming a filename of `display.ini`,
# Dump the hex contents of your ini file and show the first line
xxd display.ini - | head -n 1

> 00000000: fffe 0d00 0a00 5b00 4400 6900 7300 7000  ......[.D.i.s.p.

You’ll notice the first two bytes are read as fffe, which is the BOM of a UTF-16 file, feff with the bytes swapped.

Another complicating factor is that Rhino for Mac will mangle the file after attempting, and failing, to import it. The ini file will be truncated to just the first line and even if you fix the encoding, you are left with an empty ini that will “fail to load”, but this time only because it is empty. So get a fresh export of the ini file from Rhino for Windows before fixing the file.

How to fix

First of all, validate that this is in fact the issue you are facing by running the xxd command above.

The simplest way to fix it is to use a utility called dos2unix, but this doesn’t come standard on macOS. The easiest way to install it is via homebrew, a package manager for macOS. Once you’ve got homebrew installed, simply:

brew install dos2unix
# cd to the directory containing your .ini file
dos2unix display.ini

This will fix display.ini and you can then proceed to import it into your display settings.

It should be simple enough for Rhino to check for this BOM and complain about it / fix it silently, but at the very least it seems like it shouldn’t mangle the underlying file during what should be a read operation.

2 Likes