FileSettings

public static class FileSettings
Contains static methods and properties relating Rhino files.

Properties

AutoSaveEnabled

#Since v5.0
public static bool AutoSaveEnabled { get; set; }
Enables or disables Rhino's automatic file saving mechanism.

AutoSaveFile

#Since v5.0
public static string AutoSaveFile { get; set; }
the file name used by Rhino's automatic file saving mechanism.

AutoSaveInterval

#Since v5.0
public static TimeSpan AutoSaveInterval { get; set; }
how often the document will be saved when Rhino's automatic file saving mechanism is enabled.

AutoSaveMeshes

#Since v5.0
public static bool AutoSaveMeshes { get; set; }
save render and display meshes in autosave file.

BackupFileFolder

#Since v9.0
public static string BackupFileFolder { get; set; }
Returns or sets the location of Rhino's backup files.

ClipboardCopyToPreviousRhinoVersion

#Since v5.0
public static bool ClipboardCopyToPreviousRhinoVersion { get; set; }
Gets or sets a value that decides if copies to the clipboard are performed in both the current and previous Rhino clipboard formats. This means you will double the size of what is saved in the clipboard but will be able to copy from the current to the previous version using the clipboard.

ClipboardOnExit

#Since v5.0
public static ClipboardState ClipboardOnExit { get; set; }
Gets or sets a value that determines what to do with clipboard data on exit.

CreateBackupFiles

#Since v5.0
public static bool CreateBackupFiles { get; set; }
Gets or sets a value that controls the creation of backup files.

CreateOtherBackupFiles

#Since v9.0
public static bool CreateOtherBackupFiles { get; set; }
Gets or sets a value that controls the creation of other types of backup files.

DefaultRuiFile

#Since v5.0
public static string DefaultRuiFile { get; }
Gets the path to the default RUI file.

ExecutableFolder

#Since v5.0
public static string ExecutableFolder { get; }
Returns the directory where the main Rhino executable is located.

FileLockingEnabled

#Since v5.0
public static bool FileLockingEnabled { get; set; }
Ensure that only one person at a time can have a file open for saving.

FileLockingOpenWarning

#Since v5.0
public static bool FileLockingOpenWarning { get; set; }
Gets or sets whether to display the information dialog which identifies computer files.

HelpFilePath

#Since v5.0
public static string HelpFilePath { get; }
Gets the Rhino help file path.

InstallFolder

#Since v5.0
public static DirectoryInfo InstallFolder { get; }
Returns Rhino's installation folder.

LocalProfileDataFolder

#Since v5.8
public static string LocalProfileDataFolder { get; }
Get full path to a Rhino specific sub-folder under the per-user Local (non-roaming) Profile folder. This is the folder where user-specific data is stored. On Windows 7, 8, usually someplace like: "C:\Users\[USERNAME]\AppData\Local\McNeel\Rhinoceros\[VERSION_NUMBER]\"

PrefillExportFileName

#Since v9.0
public static bool PrefillExportFileName { get; set; }
Gets or sets a value that controls whether the Export command fills in the file name. When enabled, the file dialog starts out with the model's name in the last used export folder, made unique with a number suffix if that file already exists. When disabled, the file name starts out empty.

SaveViewChanges

#Since v5.0
public static bool SaveViewChanges { get; set; }
true for users who consider view changes a document change.

SearchPathCount

#Since v5.0
public static int SearchPathCount { get; }
Gets the amount of search paths that are currently defined.

TemplateFile

#Since v5.0
public static string TemplateFile { get; set; }
Returns or sets the location of Rhino's template file.

TemplateFolder

#Since v5.0
public static string TemplateFolder { get; set; }
Returns or sets the location of Rhino's template files.

WorkingFolder

#Since v5.0
public static string WorkingFolder { get; set; }
Returns or sets Rhino's working directory, or folder. The working folder is the default folder for all file operations.

Methods

AddSearchPath

#Since v5.0
public static int AddSearchPath(string folder, int index)
Adds a new imagePath to Rhino's search imagePath list. See "Options Files settings" in the Rhino help file for more details.
folder (string)[in] The valid folder, or imagePath, to add.
index (int)[in] A zero-based position index in the search imagePath list to insert the string. If -1, the imagePath will be appended to the end of the list.
The index where the item was inserted if success.

-1 on failure.

AutoSaveBeforeCommands

#Since v5.0
public static string[] AutoSaveBeforeCommands()
Input list of commands that force AutoSave prior to running.

DefaultTemplateFolderForLanguageID

#Since v8.0
public static string DefaultTemplateFolderForLanguageID(int languageID)
Returns the default template folder for a given language id.
languageID (int)
The default template folder as string.

DeleteSearchPath

#Since v5.0
public static bool DeleteSearchPath(string folder)
Removes an existing imagePath from Rhino's search imagePath list. See "Options Files settings" in the Rhino help file for more details.
folder (string)[in] The valid folder, or imagePath, to remove.
true or false indicating success or failure.

FindFile

#Since v5.0
public static string FindFile(string fileName)
Searches for a file using Rhino's search imagePath. Rhino will look for a file in the following locations: 1. The current document's folder. 2. Folder's specified in Options dialog, File tab. 3. Rhino's System folders.
fileName (string)short file name to search for.
full imagePath on success; null on error.

GetCurrentState

#Since v5.0
public static FileSettingsState GetCurrentState()
Returns the current state.
A new instance containing the current state.

GetDataFolder

#Since v5.0
public static string GetDataFolder(bool currentUser)
Gets the data folder for machine or current user.
currentUser (bool)true if the query relates to the current user.
A directory to user or machine data.

GetDefaultState

#Since v5.0
public static FileSettingsState GetDefaultState()
Returns the default state.
A new instance containing the default state.

GetSearchPaths

#Since v5.0
public static string[] GetSearchPaths()
Returns all of the imagePath items in Rhino's search imagePath list. See "Options Files settings" in the Rhino help file for more details.

RecentlyOpenedFiles

#Since v5.0
public static string[] RecentlyOpenedFiles()
Returns a list of recently opened files. Note that this function does not check to make sure that these files still exist.
An array of strings with the paths to the recently opened files.

SetAutoSaveBeforeCommands

#Since v5.0
public static void SetAutoSaveBeforeCommands(string[] commands)
Set list of commands that force AutoSave prior to running.
commands (string[])

UpdateFromState

#Since v8.0
public static void UpdateFromState(FileSettingsState state)
Sets all settings to a particular defined joined state.
state (FileSettingsState)A joined settings object.