Hi, I am trying to make a node that creates a different random number every run. I tried using standard random nodes from dynamo but both the random and random seed nodes will repeat the same result every run, only exception would be to use the random seed and change the seed every run. Anyhow, although changing the seed manually is already a good solution, I would prefer the random number to be generated automatically every time.
Looking in the forums I saw this python code:
Enable Python support and load DesignScript library
from Autodesk.DesignScript.Geometry import *
The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
Place your code below this line
sys.path.append(r’C:\Program Files (x86)\IronPython 2.7\Lib’)
Assign your output to the OUT variable.
OUT = r
I managed to get the node to work and generate the random number, but as with the dynamo nodes, the number stays the same every run.
Thank you all in advance for the help and I already apologize for the format, it’s my first post in here and didn’t know a better way to post the code.