Create folder with C# causes bug

Hi,

For some reason I get this error when I open rhino/gh after saving a file which includes this C# component. So happens not while loading the while when gh is open, but after a clean restart op rhino. Any suggestions what might be the cause? I use to create a new folder when exporting a file.


CreateFolder.gh (4.7 KB)

if (create)
    {
      if(!System.IO.Directory.Exists(path))
        System.IO.Directory.CreateDirectory(path);
    }

That’s a C# component. Here’s a GHPython component that creates a folder:


230124_MakFolderPython_00.gh (2.7 KB)

1 Like

Stupid typo (edittted the post). The ‘IronPython’ message threw me off before my morning coffee
Thanks for sharing the alternative.

Hehe, I figured. Regarding the error message, as I recall there have been issues with loading IronPython on botched/old Rhino installs. I don’t see how this would affect a C# component though. Anywho, perhaps running the SystemInfo Rhino command can reveal if your system is the culprit (i.e. copy/paste the output here).

Maybe is a Karma related thing. See attached (I have a small challenge for you - for the brave, that is).

IO_CreateSubDir_EntryLevel_V1.gh (116.8 KB)