Click or drag to resize
SoDBAddPlugin Method

Loads a plugin library.

Namespace: OIV.Inventor
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 9.9.36.0 (9.9.36.0)
Syntax
public static bool AddPlugin(
	string fileName
)

Parameters

fileName
Type: SystemString

Return Value

Type: Boolean
Remarks

A plugin library may implement one or more classes extending Open Inventor classes. For example a custom node or a custom file reader derived from SoInputReader.

A plugin library must implement the initPlugin() and exitPlugin() C-formatted entry-points. The initPlugin() function is responsible for registering the new class (or classes) in the Open Inventor database through the standard SoType type creation mechanism. The exitPlugin() function is used to disable the use of the custom class(s) by removing the corresponding type(s) from the Open Inventor database.

By default, Open Inventor attempts to load all files that may be plugins (files with the extension .dll or .so depending on the platform) from the following locations:

  • Application specified directories, defined using the OIV_PLUGINS_DIRECTORY environment variable, or the SoDB.addPluginsDirectory() method.

  • The current application working directory.

  • The directory containing the Open Inventor libraries.

Specific plugin libraries can be loaded and unloaded by direct calls to the SoDB.addPlugin() and SoDB.removePlugin() methods.

Different plugins can be designed depending on their usage. Please refer to the Open Inventor plugin section in the documentation

See Also