Adds, modifies, or removes data from RhinoScript's runtime data dictionary.
Rhino.SetRuntimeData (strKey, vaValue)
strKey |
Required. String. The key that identifies the element to be returned. |
vaValue |
Optional. Variant. The value to either add or set. Note, if this value is Null or empty, the key will be removed. |
Bool |
True or False indicating success or failure. |
Null |
On error. |
Sub MyCircle
Dim arrPoint, dblRadius0, dblRadius1
arrPoint = Rhino.GetPoint("Center point")
If IsNull(arrPoint) Then Exit Sub
dblRadius0 = Rhino.GetRuntimeData("Radius")
If IsNull(dblRadius0) Then dblRadius0 = 1.0
dblRadius1 = Rhino.GetReal("Radius", dblRadius0, 0.1)
If IsNull(dblRadius1) Then Exit Sub
Call Rhino.AddCircle(arrPoint, dblRadius1)
If dblRadius1 <> dblRadius0 Then
Call Rhino.SetRuntimeData("Radius", dblRadius1)
End If
End Sub