FileSettings

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

Properties

AutoSaveEnabled

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

AutoSaveFile

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

AutoSaveInterval

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

AutoSaveMeshes

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

BackupFileFolder

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

ClipboardCopyToPreviousRhinoVersion

#Since v5.0
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.
public static bool ClipboardCopyToPreviousRhinoVersion { get; set; }

ClipboardOnExit

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

CreateBackupFiles

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

CreateOtherBackupFiles

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

DefaultRuiFile

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

ExecutableFolder

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

FileLockingEnabled

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

FileLockingOpenWarning

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

HelpFilePath

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

InstallFolder

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

LocalProfileDataFolder

#Since v5.8
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]\"
public static string LocalProfileDataFolder { get; }

PrefillExportFileName

#Since v9.0
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.
public static bool PrefillExportFileName { get; set; }

SaveViewChanges

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

SearchPathCount

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

TemplateFile

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

TemplateFolder

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

WorkingFolder

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

Methods

AddSearchPath

#Since v5.0
Adds a new imagePath to Rhino's search imagePath list. See "Options Files settings" in the Rhino help file for more details.
public static int AddSearchPath(
folder,
[in] The valid folder, or imagePath, to add.
index
[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
Input list of commands that force AutoSave prior to running.
public static string[] AutoSaveBeforeCommands()

DefaultTemplateFolderForLanguageID

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

DeleteSearchPath

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

FindFile

#Since v5.0
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.
public static string FindFile(
fileName
short file name to search for.
)
full imagePath on success; null on error.

GetCurrentState

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

GetDataFolder

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

GetDefaultState

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

GetSearchPaths

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

RecentlyOpenedFiles

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

SetAutoSaveBeforeCommands

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

UpdateFromState

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