This is going to be a little complicated to explain.
I often run two Rhino instances on two screens, each importing files from a separate source like a USB stick and sending files to a specific laser cutter.
In V5, we had the problem that using either the Rhino Import command or getting a file to use in a script using rs.OpenFileName() always defaulted to the last-used directory ignoring which instance sent the command. So if I imported something in instance 2 of Rhino, going back to instance 1 and calling Import would open the directory last used by instance 2 (Key2) and not the directory last used by instance 1 (Key1).
In V6, huzzaahhh! this is fixed! Each instance keeps its own directory for Rhino native Open and Import, there is no longer “crosstalk” between instances. I think @stevebaer is responsible for that fix, many thanks!
But… the problem unfortunately persists in a scripted situation using OpenFileName(). That seems not to have been modified, the result is that OpenFileName() has a common “last-used directory” entry for all running instances. So it remains like V5. And, unfortunately, mostly all my laser file import work is done via script - as I run a lot of automated checks and fixes to files before cutting.
So, is there any way that OpenFileName() could remember which instance it’s called from and use the same directory as the previous call in that instance?
As a corrolary, is there a RhinoCommmon method for accessing the last-used folders by Open or Import? rs.WorkingFolder() does not do it - I’m not even really sure what rs.WorkingFolder() calls.