Exception iterating RhinoApp.ToolbarFiles in latest WIP

Hi,
the following code snippet throws a IndexOutOfRangeException after first iteration

foreach (var tf in RhinoApp.ToolbarFiles) {
     if (tf.Name == "default") {
          defToolbarFile = tf;
     }
}

Any way to work around this? Should I just wait for a fix?

Thanks

Hi @m.camillo,

Thanks, I’ve logged the issue.

https://mcneel.myjetbrains.com/youtrack/issue/RH-71511

– Dale

RH-71511 is fixed in the latest WIP

Hi,
so I managed to test the solution and the iteration doesn’t throws anything now. Anyway, I found another issue: I tried to open a .rui file created with Rhino 7 with

var tollFile = RhinoApp.ToolbarFiles.Open(pathToRui)

but this returns null. I manually linked the file using Rhino 8 settings and it works as expected.
Is there any compatibility issue?

Thanks

Bug is still encountered in latest WIP version 8.0.22347.14305, 2022-12-13

@JohnM - can you help with this?

Hi,
ToolbarFiles.Open() still returns null with a valid RUI file, I’m on WIP version 8.0.23010.12305

Hi @m.camillo,

Yes this is true and known. This isn’t likely to change until we get closer to shipping Rhino 8.

– Dale

1 Like

Hello, I have the same issue trying to load a *.rui file.
The file is not loaded and ToolbarFiles.Open() returns null.

Any update?

1 Like

Hi @p.stragliotto,

We’re getting there.

https://mcneel.myjetbrains.com/youtrack/issue/RH-76914

– Dale

1 Like