This simple test script fails to update the value for ddd.
Line 19 is not working.
An gues you declare ddd as a number (10) later ddd is a list???
Need the full sample code and an indication of your inputs, what Python engine you are using, and what you expect it to produce.
assign the OUT variable after the function call (at the end of main_fn
)
before calling the function, in the global scope the OUT variable is indeed equal to 10
âLine 19 is not workingâ doesnât really explain much.
Is it crashing?
Is it just doing nothing?
Is it making a cup of tea but you wanted coffee?
Also, youâve got a function but youâre not returning anythingâŚ
Yes I know youâre trying to use global⌠but iâd suggest you try return.
def fn_a():
global ddd
ddd = (aaa - bbb)
return ddd
Youâre also not checking that aaa and bbb are integers.
What if theyâre a list? What if theyâre characters? What if they are⌠well, you get the point.
Thanks for all the help. Revit python script outputting is little different than Vanilla Python 3. This was a proof of concept for a larger project. It works now.