How to add ezdxf module to Rhino python?

I tried to add c:\Python38 path to Rhino python options, but still didn’t find the module “Message: No module named ezdxf”

ezdxf source: ezdxf · PyPI

Hi @gdlfactory,

Rhino’s implementation of Python is based in IronPython, not CPython. Thus, it cannot use Python packages you get from Pypi.

That said, Rhino can import and export DXF files. So what is it that you are trying to do?

– Dale

I would like to remove programmatically layer 0 from dxf files. That seems impossible in Rhino by default. Or is there another way to do that?

ezdxf lib would do the thing, but haven’t figured out if it’s even possible to install on Rhino / IronPython…

It says it requires at least python 3.7 so it should not work in IronPython. There are some older versions on pypi which claim Python 2.7 compatibility - you could try one of them. You may also need to set an environment variable to disable C extensions as these will not work in IronPython.