ViewDisplayModeEx

Returns or sets a view's display mode.  Unlike the ViewDisplayMode method, which only allows you to set a view to wireframe, shaded, or render preview, this method allows you to set a view to any display mode including those listed in the Advanced Display Modes section of Rhino's Options dialog box.

Syntax

Rhino.ViewDisplayModeEx ([strView [, strMode [, blnReturnNames]]])

Parameters

strView

Optional.  String.  The title or identifier of the view.  If omitted, the current active view is used.

strMode

Optional.  String.  The name or identifier of the display mode obtained from the ViewDisplayModes method.

blnReturnNames

Optional.  Boolean.  If True (default), then the name the display mode is returned. If False, then the identifier of the display mode is returned.

Returns

Number

If strMode is not specified, the current display mode for the specified view if successful.

Number

If strMode is specified, the previous display mode for the specified view if successful.

Null

If not successful, or on error.

Example

Dim arrViews, strView

arrViews = Rhino.ViewNames

If IsArray(arrViews) Then

For Each strView In arrViews

Rhino.ViewDisplayModeEx strView, "Ghosted"

Next

End If

Also See

CurrentView

ViewDisplayMode

ViewDisplayModes

ViewNames