Grasshopper

algorithmic modeling for Rhino

How to ignore recovery file with method Plugin.GH_RhinoScriptInterface.OpenDocument?

Dear reader,

We're working on an automated integration testing framework which includes a step in which a grasshopper definition can be loaded.

Is there a way to ignore the recovery file dialogue or better not consider the recovery file at all during loading? It is a problem for us because it can potentially block the automated process.

Looking forward for a solution

Regards, Wei Pien

Views: 525

Replies to This Discussion

No, but you can delete recovery files if you've got code running, or you could rename files you load. Recovery files are stored in %AppData%\Grasshopper\AutoSave

Or, if you have code running inside Grasshopper, you can reach the folder via Grasshopper.Folders.AutoSaveFolder;

Also autosave files are associated with regular files using a hash of the full filename. So, if you move a file to a different folder, or rename it, the autosave association will be broken.

Tnx for the response David. In this specific situation we're running it as a Rhino plugin, however, I remember that about a year ago you and a colleague figured out how to get access to the complete GH API (v5 that is). It was by means of a python script running in Rhino, so I guess the same mechanism should work for a custom Rhino plugin as well then:)

If you're running C# or some other language as a plugin, it will be trivial to just delete either all files in the autosave folder, or the entire folder. If you don't want to mess with the autosave data, you can rename the autosave files by changing the extension, and then change it back again when you're done with your automated process. Deleting, moving or renaming files is pretty trivial in any language.

Oops, I'm a bit clumpsy with this GUI on the i
iPhone. Damn it.
I'm aware of the IO libraries. I was interested in accessing the autosave folder via the GH method which avoids using custom string to access the folder on the file system.

Are you aware that Rhino gets installed in different folder names on different machines? Even though, the same Rhino installation file is used? So we got something like the following different folder names:
Rhino 5 (64 bits) and
Rhino 5.0 (64 bits)

This was a problem for us since we use a build script that "auto installs" the compiled plugin by copying it to that folder. We also found a Rhino plugin folder somewhere in appdata but the plugin folder names in there seem to be hashed. So we're not sure how we can install/add a Rhino plugin in there.

Yes, various 'special' folders will have different uris on different versions of Windows. Which is why you always ask Windows where %appdata% is for the current user, then append the \Grasshopper\Autosave\ subfolders and you should always end up at the correct location.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service