Returns a RhinoScript user data item from an object's attributes.
Rhino.GetAttributeData (strObject [, strSection [, strEntry]])
strObject |
Required. String. The object's identifier. |
strSection |
Optional. String. The section name. If omitted, all section names are returned. |
strEntry |
Optional. String. The entry name. If omitted, all entry names for strSection are returned. |
Array |
A zero-based, one-dimensional array of all section names if strSection is not specified. |
Array |
A zero-based, one-dimensional array of all entry names for strSection if strEntry is not specified. |
String |
The value of the entry if both strSection and strEntry are specified. |
Null |
If not successful, or on error. |
Dim strObject, strValue
strObject = Rhino.GetObject("Select object")
If Not IsNull(strObject) Then
strValue = Rhino.GetAttributeData(strObject, "MySection1", "MyEntry1")
If Not IsNull(strValue) Then
Rhino.Print strValue
End If
strValue = Rhino.GetAttributeData(strObject, "MySection1", "MyEntry2")
If Not IsNull(strValue) Then
Rhino.Print strValue
End If
strValue = Rhino.GetAttributeData(strObject, "MySection2", "MyEntry1")
If Not IsNull(strValue) Then
Rhino.Print strValue
End If
End If