Returns User Text that is stored on an object. For more details on User Text, see the discussion found in the User Data Methods summary.
rhinoscriptsyntax.GetUserText (object_id, key=None, attached_to_geometry=False)
rhinoscript.userdata.GetUserText (object_id, key=None, attached_to_geometry=False)
object_id |
Required. String or Guid. The object's identifier. |
||||||
key |
Optional. String. The key name. If omitted or an empty string ("") is specified, all key names for the object are returned. |
||||||
attached_to_geometry |
Optional. Boolean. The location on the object to retrieve the User Text.
|
String |
If key is specified, then the associated value if successful. |
List |
If key is not specified, then a list of key names if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if obj:
print rs.GetUserText(obj, "PartNo")
print rs.GetUserText(obj, "Price")