Solved! (sort of) Areas not numbers in Python script

Here’s an odd thing , I am reading and manipulating Area data , for some reason the python script fails to interpert the Area as number - it complains about not being able to subtract str and float … any ideas what am I missing ?

Are you sure that index 3(22.6222…) isn’t a string?

To me it seems it is … if so:
d.append(float(x[3]) - 9.00)

Thanks 3Pinter,
It’s a float , I think the problem is with some areas that are not enclosed.
I am checking all the Areas if the Area (of the area) is larger than 0.0 I get True or Null rather than true or False. This is very frustrating …

That is probably because the non-placed areas have no values (aka. null) so Dynamo can’t compare them.

However use this little python script to check if it has a value:

# Enable Python support and load DesignScript library
import clr
from Autodesk.DesignScript.Geometry import *

OUT = [True if input else False for input in IN[0]]

It’s odd , I think that unplaced rooms have 0.0 Area rather than nulls.
Didn’t think of python list comprehension for this .

you are welcome!

ps: mark a reply as a solution so the topic gets the solved status (besides you topic title change) :+1:t2: