Click or drag to resize
SoConsole Class

Creates a Win32 console for printing messages.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.WinSoWinComponent
      OIV.Inventor.WinSoConsole

Namespace: OIV.Inventor.Win
Assembly: OIV.Inventor.Win (in OIV.Inventor.Win.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoConsole : SoWinComponent

The SoConsole type exposes the following members.

Constructors
  NameDescription
Public methodSoConsole
Calls SoConsole((System.Windows.Forms.Control ^)nullptr, (System.String ^)nullptr, true).
Public methodSoConsole(Control)
Calls SoConsole(parent, (System.String ^)nullptr, true).
Public methodSoConsole(Control, String)
Calls SoConsole(parent, name, true).
Public methodSoConsole(Control, String, Boolean)

Constructor.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetClassName

Returns the class name.

(Inherited from SoWinComponent.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetIconTitle

Included for portability only.

(Inherited from SoWinComponent.)
Public methodGetSize

Convenience routine on the window handle.

(Inherited from SoWinComponent.)
Public methodGetTitle

Gets window title.

(Inherited from SoWinComponent.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetWidgetName

Returns the window handle name.

(Inherited from SoWinComponent.)
Public methodHide

This hides the component.

(Inherited from SoWinComponent.)
Public methodIsFullScreen

Queries if the viewer is in fullscreen mode.

(Inherited from SoWinComponent.)
Public methodIsFullScreenEnable

Queries if it is possible to put the viewer in fullscreen mode.

(Inherited from SoWinComponent.)
Public methodIsTopLevelShell

Returns true if this component is a top level shell component (has its own window).

(Inherited from SoWinComponent.)
Public methodIsVisible

Returns true if this component is mapped onto the screen.

(Inherited from SoWinComponent.)
Public methodPrintMessage

Sends a message to the console.

Public methodSetFullScreen

Switches the viewer into (or out of) fullscreen mode.

(Inherited from SoWinComponent.)
Public methodSetFullScreenEnable

Enables/disables fullscreen mode.

(Inherited from SoWinComponent.)
Public methodSetIconTitle

Included for portability only.

(Inherited from SoWinComponent.)
Public methodStatic memberSetMaxNumMessages

Sets the maximum number of messages to be printed in the console.

Public methodSetSize

Convenience routine on the window handle.

(Inherited from SoWinComponent.)
Public methodSetTitle

Sets window title.

(Inherited from SoWinComponent.)
Public methodShow

This shows the component.

(Inherited from SoWinComponent.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyHandle
Implements Handle.
(Inherited from SoWinComponent.)
Public propertyWindowCloseCallback

Sets the delegate to invoke when the user closes this component (double click in the upper left corner) - by default Hide() is called on this component, unless a delegate is specified.

(Inherited from SoWinComponent.)
Top
Remarks

The OIV.Inventor.Win.SoConsole class provides a convenient way to display Open Inventor error messages or other application debug messages in a Win32 console. This can be a very useful feature for simple Win32 applications.

There is only one error console per application. To get this console, call OIV.Inventor.Win.SoWin.GetErrorConsole(). It is then possible to print messages to it using the printMessage function.

The console replaces the original message box mechanism. Every Open Inventor error is caught and written to the console. This includes user-defined error messages that are generated with OIV.Inventor.Errors.SoDebugError. For example, OIV.Inventor.Errors.SoDebugError.Post(System.String, System.String)("YourClass", "YourMessage") will print your message to the console.

Due to a Windows programming limitation, the console is not usable in multi-threaded applications. In this case, it is possible to switch to the original message box mechanism by setting environment variable OIV_OLD_ERROR_HANDLER.

The Save button allows the user to save error information into a file named oivErrorFile.txt. The Clear button deletes all error messages currently displayed in the console.

See Also