Is there a way to manually set the Recently Opened files list?
I know I can get it via: Rhino.ApplicationSettings.FileSettings.RecentlyOpenedFiles Method
But I actually would like to modify it.
The reason is I am working on a script that mass-imports external file assets either via Insert or Import commands, and after the script runs, all the Recent Files list gets populated by these imported by the script. I want the script to not affects that list. So my idea was to remember the original list via the method above, and one the script is done, restore the list. Is there a way ?
Sorry, it’s actually caused by batch opening files - but ideally I want this to happen ‘under the hood’ and not be added to the recently opened files list.
No, that’s not related to that one It’s related to the fact that export selected dumps tons of unneeded info into the file (i.e. all materials from the original document) so in order to control the damage we need to batch-process and purge etc. the export selected files. And there is a lot of it, and it’s done often. So it gets in the way of actual project files that are needed to be listed in the recent files list. I guess I am looking for a way to not log certain files into the “recently opened” list, or a way to override the list manually once the batch-processing is done.
Hmm ok, but you can read and write via IO. That means you don’t need to use export selected at all. Anyway, in my eyes, it is a conceptual problem or lack of usability in API as I doubt overriding recently opened files should be a way to go in any case, although I don’t know the case in depth.
for the same purpose. I wanted to save it, clear (hide) it during online meetings and later restore it. I ended up parsing the xml file and tried to change the xml node values which worked. But the changes did not show up during the current Rhino session. Only after restarting Rhino. I’ve found that Rhino seems to update the recent files list during startup so i guess there is a risk to manipulate the xml file during runtime.
Maybe @stevebaer knows more about it. I would say that as long as there is no way to “reload” the settings xml during runtime and update the list below the file menu dropdown, my trial to change the InnerText of the <value> nodes below the <entry> node for the recent files has no purpose.
Thank you All for your advice. I will look into messing with the xml file.
Agree it would be helpful to be able to force Rhino to reload settings from the xml file on demand…