How to disable MissingFontWarning message in Python

I try to run auto test in Rhino 7 recently, but I found the MissingFontWarning message below always interrupts the auto test procedure.
I have read about the similar discussion before, and I wonder is there any command can disable showing this message in Python script?

Hey @nick_chang,

Can you post a simple file I can use for testing?


– Dale

Hi @dale ,

Here is the test model :

Box.3dm (19.9 KB)

Hope it’s useful for solving this problem,thanks.

Hi @nick_chang,

Thanks for the file.

If I script the Open command (i.e. _-Open), then I don’t see the missing font dialog box.

How are you opening he file with Python? A small sample code snippet might be helpful.

– Dale

Hi @dale ,

Here is the sample code: (90 Bytes) (remember to chang the file path for model)

This problem will occur when I use the other computer, which doesn’t have Chinese font in windows.

And it will show some message on the history window below, because the layer name ‘預設值’ cannot find the font.

Though it can disable the message dialog box by checking ‘Don’t show this message again’ manually, but I need to know if there is any method to close this message automatically, thanks for helping.

Hi @nick_chang,

Rather than this:


Do this:


The hyphen character makes the command run in “scripted” mode which will suppress any dialog boxes.

Also, you might want to surround the path string with double-quote characters just it contains spaces.

import rhinoscriptsyntax as rs
rs.Command('_-open ' + chr(34) + 'C:\\Users\\Dale\\Downloads\\Box.3dm' + chr(34))

Hope this helps.

– Dale

Hi @dale,

Thanks a lot ! I’ll take it.