ObjectSpace

Returns the active working space of an object.

Syntax

Rhino.ObjectSpace(strObject)

Parameters

strObject

Required.  String.  The identifier of an object.

Returns

Number

The active space of the object if successful. The valid active space types are as follows:

Value

Hex

Description

0

&h0

Unknown space

1

&h1

Model space

2

&h2

Layout, or page, space

Null

On error.

Example

Dim strObject, intSpace

strObject = Rhino.GetObject("Select object to scale")

If Not IsNull(strObject) Then

  intSpace = Rhino.ObjectSpace(strObject)

  If intSpace = 1 Then

    Rhino.Print "Object is in model space."

  Else

    Rhino.Print "Object is in layout space."

  End If

End If

Also See

IsObject