IsUserText

Verifies that an object contains user text. For more details on User Text, see the discussion found in the User Data Methods summary.

Syntax

rhinoscriptsyntax.IsUserText( object_id )

rhinoscript.userdata.IsUserText( object_id )

Parameters

object_id

Required.  String or Guid.  The object's identifier.

Returns

Number

0 = no user text; 1 = attribute user text; 2 = geometry user text; 3 = both attribute and geometry user text.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select object")  

if obj:

    usertext_type = rs.IsUserText(obj)

    if usertext_type==0: print "Object has no user text"

    elif usertext_type==1: print "Object has attribute user text"

    elif usertext_type==2: print "Object has geometry user text"

    elif usertext_type==3: print "Object has attribute and geometry user text"

    else: print "Object does not exist"

Also See

GetUserText

SetUserText