Reset Material Editor Slot Error (3dsmax 2012 and Vray 1.5 SP6)

When ever I reset material editor slots I get an error stating --Runtime Error: Cannot assign undefined to Material Editor Slots

This is after I have loaded the custom UI Layout of Max.vray

Seems to only be when I swithc to Vray UI Layout.

Is your custom UI layout from an older version of 3ds Max?

That is notorious for causing problems like this, due to variables & functions changing names or disappearing between versions.

I don’t think so.
Just installed Vray 1.5 Sp6 and the switched UI Layout to Max.Vray

There was a fix for this somewhere on the forum, not sure where I found it now, but I had this problem before and it was resolved. Do some searching and it should turn up.

It fails for me, too!

I found a solution: