|
|
|
@@ -27,7 +27,7 @@ class FunctionInputs(AutomateBase):
|
|
|
|
|
|
|
|
|
|
file_name: str = Field(
|
|
|
|
|
title="File Name",
|
|
|
|
|
description="The name of the Excel file.",
|
|
|
|
|
description="The name of the Excel file to export.",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
inlcude_areas: bool = Field(
|
|
|
|
@@ -43,38 +43,45 @@ class FunctionInputs(AutomateBase):
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
nua_list: str = Field(
|
|
|
|
|
title="NUA (Nett Usable Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="NUA (Optional)",
|
|
|
|
|
description="Nett Usable Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
nia_list: str = Field(
|
|
|
|
|
title="NIA (Nett Internal Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="NIA (Optional)",
|
|
|
|
|
description="Nett Internal Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
nla_list: str = Field(
|
|
|
|
|
title="NLA (Nett Leasable Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="NLA (Optional)",
|
|
|
|
|
description="Nett Leasable Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
gia_list: str = Field(
|
|
|
|
|
title="GIA (Gross Internal Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="GIA (Optional)",
|
|
|
|
|
description="Gross Internal Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
gea_list: str = Field(
|
|
|
|
|
title="GEA (Gross External Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="GEA (Optional)",
|
|
|
|
|
description="Gross External Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
gla_list: str = Field(
|
|
|
|
|
title="GLA (Gross Leasable Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="GLA (Optional)",
|
|
|
|
|
description="Gross Leasable Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
gba_list: str = Field(
|
|
|
|
|
title="GBA (Gross Building Area)",
|
|
|
|
|
strict= False
|
|
|
|
|
title="GBA (Optional)",
|
|
|
|
|
description="Gross Building Area",
|
|
|
|
|
default= ""
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -122,20 +129,18 @@ def automate_function(
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
items = []
|
|
|
|
|
id_lists = []
|
|
|
|
|
|
|
|
|
|
for i in all_objects:
|
|
|
|
|
if hasattr(i, "category"): # Check if the object has the "category" attribute
|
|
|
|
|
if i.category in filter_categories: # Check if the category matches the filter list
|
|
|
|
|
items.append(i) # Append the whole object to the items list
|
|
|
|
|
id_lists.append(i.id)
|
|
|
|
|
else:
|
|
|
|
|
continue # Skip if "category" does not exist
|
|
|
|
|
|
|
|
|
|
# List of properties
|
|
|
|
|
list_prop = [
|
|
|
|
|
"category",
|
|
|
|
|
"level.name",
|
|
|
|
|
"level",
|
|
|
|
|
"properties.Parameters.Instance Parameters.Identity Data.Name.value",
|
|
|
|
|
"properties.Parameters.Instance Parameters.Dimensions.Area.value",
|
|
|
|
|
]
|
|
|
|
@@ -187,7 +192,7 @@ def automate_function(
|
|
|
|
|
automate_context.store_file_result(f"./{output_file}")
|
|
|
|
|
automate_context.mark_run_success("All data sent successfully! Download your file below.")
|
|
|
|
|
except:
|
|
|
|
|
automate_context.mark_run_failed("An error occurred while writing to the file. Ensure that the parameters 'Level,' 'Name,' and 'Area' exist. Additionally, verify that the area/room names are correctly typed and separated by commas.")
|
|
|
|
|
automate_context.mark_run_failed("An error occurred while writing to the file. Ensure that the parameters Areas or Rooms category exist. Additionally, verify that the area/room names are correctly typed and separated by commas.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Function to sum area for each group, ensuring missing levels return 0
|
|
|
|
|