ObjectType

Returns the object type.

Syntax

rhinoscriptsyntax.ObjectType (object_id)

rhinoscript.object.ObjectType (object_id)

Parameters

object_id

Required.  String or Guid.  The identifier of the object.

Returns

Number

The object type if successful.  The valid object types are as follows:

Value

Description

0

Unknown object

1

Point

2

Point cloud

4

Curve

8

Surface or single-face brep

16

Polysurface or multiple-face

32

Mesh

256

Light

512

Annotation

4096

Instance or block reference

8192

Text dot object

16384

Grip object

32768

Detail

65536

Hatch

131072

Morph control

134217728

Cage

268435456

Phantom

536870912

Clipping plane

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select object")

if obj:

    objtype = rs.ObjectType(obj)

    print "Object type:", objtype

Also See

ObjectsByType