Click or drag to resize

HostUtils Methods

The HostUtils type exposes the following members.

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 memberDescribeGeometry
Returns a description that is similar to the one in the _What command, except for not mentioning units and other attribute data. This description is translated in the current Rhino version.
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 memberExecuteNamedCallback
Execute a named callback
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 memberGetActivePlugInVersionFolders(Boolean)
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 memberGetCurrentProcessInfo
Returns information about the current process. If Rhino is the top level process, processName is "Rhino". Otherwise, processName is the name, without extension, of the main module that is executing. For example, "compute.backend" or "Revit". processVersion is the System.Version of the running process. It is the FileVersion of the executable.
Public methodStatic memberGetCustomComputeEndpoints
Used by compute to define custom endpoints
Public methodStatic memberGetPlatformServiceT
For internal use only. Loads an assembly for dependency injection via IPlatformServiceLocator.
Public methodStatic memberGetPrinterDPI
Get the output resolution for a given printer.
Public methodStatic memberGetPrinterFormMargins
Get limit margins for a given form (page size) and a given printer. This is the physical limit area that a printer can print on a given page
Public methodStatic memberGetPrinterFormNames
Get list of form names available for a given printer
Public methodStatic memberGetPrinterFormSize
Get the size of a sheet for a given form name / printer combination
Public methodStatic memberGetPrinterNames
Get list of printers available on this system
Public methodStatic memberGetRhinoDotNetAssembly
Only works on Windows. Returns null on Mac.
Public methodStatic memberGetSystemProcessorCount
Get the processor count on this hardware. It supports querying on CPUs with more than 64 processors (Windows).
Public methodStatic memberGetSystemReferenceAssemblies
Gets the system reference assemblies to use when compiling code dynamically with Roslyn. Includes RhinoCommon, Rhino.UI, and Eto.
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 memberLoadAssemblyFrom
Calls Assembly.LoadFrom in .NET 4.8. May call a different routine under .NET 7
Public methodStatic memberLogDebugEvent
Logs a debug event. The function will log the filename and line number from where this function is called, in addition to the input message.
Public methodStatic memberRecordInitInstanceTime
Used to help record times at startup with the -stopwatch flag to help determine bottlenecks in start up speed
Public methodStatic memberRegisterComputeEndpoint
Register a class that can participate as a compute endpoint
Public methodStatic memberRegisterDynamicCommand
Adds a new dynamic command to Rhino.
Public methodStatic memberRegisterNamedCallback
Register a named callback
Public methodStatic memberRemoveNamedCallback
Remove a named callback from the dictionary of callbacks
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
See Also