I am creating a Dynamo script that renumbers rooms. I am wanting the script to have an initial start value (100) and then a step value (1). I am wanting the script to add 1 to every element in my list of selected rooms starting from my start value. Example, 100, 101, 102, etc… Right now, my custom script will apply my start value to the room number, but will not continue adding one to each element on the list. I am new to programming so if anyone could please help me figure out the logic to this problem I would greatly appreciate it! I have attached my rooms that were renumbered with the script and the Dynamo script itself. The script in my custom node is,
def addOne(initialNumber, numberStep)
start = initialNumber - numberStep;
sum = start + numberStep;
return = sum;
The reason that I subtract the numberStep from the initialNumber is because I want the room numbering to start at the first number given. Without this the first room would be labeled as 101 instead of 100. Thanks in advance for the help!