GetRuntimeData

Retrieves data from RhinoScript's runtime data dictionary.

Syntax

Rhino.GetRuntimeData (strKey)

Parameters

strKey

Required.  String.  The key that identifies the element to be returned.

Returns

Variant

The value of the element if successful.

Null

If not successful, or on error.

Example

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

Also See

RuntimeDataCount

SetRuntimeData