Click or drag to resize

HostUtils Class

Contains static methods to deal with teh runtime environment.
Inheritance Hierarchy
SystemObject
  Rhino.RuntimeHostUtils

Namespace:  Rhino.Runtime
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public static class HostUtils

The HostUtils type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberComputerSerialNumber
Gets the serial number of the computer running Rhino.
Public propertyStatic memberDeviceId
The DeviceId is a unique, stable ID that anonymously identifies the device that Rhino is running on. It is computed based on hardware information that should not change when the OS is upgraded, or if commonly modified hardware are added or removed from the computer. The machine-specific information is hashed using a cryptographic hash to make it anonymous.
Public propertyStatic memberDeviceName
Name of the computer running Rhino. If the computer is part of a Windows Domain, the computer name has "@[DOMAIN]" appended.
Public propertyStatic memberRunningInMono
Tests if this process is currently executing under the Mono runtime.
Public propertyStatic memberRunningInRhino
Tests if RhinoCommon is currently executing inside of the Rhino.exe process. There are other cases where RhinoCommon could be running; specifically inside of Visual Studio when something like a windows form is being worked on in the resource editor or running stand-alone when compiled to be used as a version of OpenNURBS.
Public propertyStatic memberRunningOnOSX
Tests if this process is currently executing on the Mac OSX platform.
Public propertyStatic memberRunningOnWindows
Tests if this process is currently executing on the Windows platform.
Public propertyStatic memberSendDebugToCommandLine
Gets or sets whether debug messages are printed to the command line.
Top
Methods
  NameDescription
Public methodStatic memberAutoInstallPlugInFolder
Gets the auto install plug-in folder for machine or current user.
Public methodStatic memberCallFromCoreRhino
Don't change this function in ANY way unless you chat with Steve first! This function is called by Rhino on initial startup and the signature must be exact
Public methodStatic memberCheckForRdk
Determines if the RDK is loaded.
Public methodStatic memberClearFpuExceptionStatus
Clear FPU exception and busy flags (Intel assembly fnclex)
Public methodStatic memberCreateCommands(PlugIn)
Parses a plugin and create all the commands defined therein.
Public methodStatic memberCreateCommands(IntPtr, Assembly)
Parses a plugin and create all the commands defined therein.
Public methodStatic memberCreatePlugIn
Instantiates a plug-in type and registers the associated commands and classes.
Public methodStatic memberDebugDumpToString(BezierCurve)
Gets the debug dumps. This is a text description of the geometric contents. DebugDump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.
Public methodStatic memberDebugDumpToString(GeometryBase)
Gets the debug dumps. This is a text description of the geometric contents. DebugDump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.
Public methodStatic memberDebugString(String)
Prints a debug message to the Rhino Command Line. The message will only appear if the SendDebugToCommandLine property is set to true.
Public methodStatic memberDebugString(String, Object)
Prints a debug message to the Rhino Command Line. The message will only appear if the SendDebugToCommandLine property is set to true.
Public methodStatic memberDisplayOleAlerts
Defines if Ole alerts ("Server busy") alerts should be visualized.

This function makes no sense on Mono.

Public methodStatic memberExceptionReport(Exception)
Informs RhinoCommon of an exception that has been handled but that the developer wants to screen.
Public methodStatic memberExceptionReport(String, Exception)
Informs RhinoCommon of an exception that has been handled but that the developer wants to screen.
Public methodStatic memberFileNameEndsWithRhinoBackupExtension
Strip file extension from file name and check to see if it is a valid Rhino backup file extension.
Public methodStatic memberFileNameEndsWithRhinoExtension
Strip file extension from file name and check to see if it is a valid Rhino file extension.
Public methodStatic memberGetAbsolutePath
Call this method to convert a relative path to an absolute path relative to the specified path.
Public methodStatic memberGetActivePlugInVersionFolders
Recurses through the auto install plug-in folders and returns the directories containing "active" versions of plug-ins.
Public methodStatic memberGetAssemblySearchPaths
Returns list of directory names where additional assemblies (plug-ins, DLLs, Grasshopper components) may be located
Public methodStatic memberGetPlatformServiceT
For internal use only
Public methodStatic memberGetPlatformServiceT(String, String)
For internal use only. Loads an assembly for dependency injection via IPlatformServiceLocator.
Public methodStatic memberGetRhinoDotNetAssembly
Only works on Windows. Returns null on Mac.
Public methodStatic memberInitializeRhinoCommon
Makes sure all static RhinoCommon components is set up correctly. This happens automatically when a plug-in is loaded, so you probably won't have to call this method.
Public methodStatic memberInitializeRhinoCommon_RDK
Makes sure all static RhinoCommon RDK components are set up correctly. This happens automatically when the RDK is loaded, so you probably won't have to call this method.
Public methodStatic memberInitializeZooClient
Initializes the ZooClient and Rhino license manager, this should get called automatically when RhinoCommon is loaded so you probably won't have to call this method.
Public methodStatic memberInPlaceConstCast
DO NOT USE UNLESS YOU ARE CERTAIN ABOUT THE IMPLICATIONS.

This is an expert user function which should not be needed in most cases. This function is similar to a const_cast in C++ to allow an object to be made temporarily modifiable without causing RhinoCommon to convert the class from const to non-const by creating a duplicate.

You must call this function with a true parameter, make your modifications, and then restore the const flag by calling this function again with a false parameter. If you have any questions, please contact McNeel developer support before using!

Public methodStatic memberIsManagedDll
Inspects a dll to see if it is compiled as native code or as a .NET assembly
Public methodStatic memberIsRhinoBackupFileExtension
Check to see if the file extension is a valid Rhino file extension.
Public methodStatic memberIsRhinoFileExtension
Check to see if the file extension is a valid Rhino file extension.
Public methodStatic memberRecordInitInstanceTime
Used to help record times at startup with the -stopwatch flag to help determine bottlenecks in start up speed
Public methodStatic memberRegisterDynamicCommand
Adds a new dynamic command to Rhino.
Public methodStatic memberRhinoCommonExceptionHandler
For internal use only!!! Unhanded exception handler, writes stack trace to RhinoDotNet.txt file
Public methodStatic memberSendLogMessageToCloudCallbackProc
Informs RhinoCommon of an message that has been handled but that the developer wants to screen.
Public methodStatic memberSetInShutDown
Informs the runtime that the application is shutting down.
Public methodStatic memberShutDownRhinoCommon_RDK
Makes sure all static RhinoCommon RDK components are de-initialized so they aren't calling into space when the RDK is unloaded.
Public methodStatic memberUnhandledThreadException
Exception handler for exceptions occurring on the UI thread
Top
Events
  NameDescription
Public eventStatic memberOnExceptionReport
Is raised when an exception is reported with one of the ExceptionReport(Exception) method.
Public eventStatic memberOnSendLogMessageToCloud
Is raised when an exception is reported with one of the method.
Top
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.6
See Also