What is the best way to port result/value from one script to another?

Hi Medo,

There are a few topics on this issue.
In case of python, currently the best method is to use sticky dictionary:

import scriptcontext as sc

# first script
value = "testing"
sc.sticky["someKey"] = value

# call it from second script
value2 = sc.sticky["someKey"]
print value2

Unlike rs.SetDocumentData and rs.GetDocumentData, sticky dictionary will accept anything for it’s value: string, number, geometry, class…
But looks like in your case (if I understood you correctly, you are trying to “catch” numbers user used), both rs.SetDocumentData and rs.GetDocumentData would do the job too.