5 Commits

Author SHA1 Message Date
dependabot[bot] 9874d29cd3 Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 22:14:26 +00:00
NLSA 83876e7898 Update README.md
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2025-03-20 14:28:08 +01:00
NLSA 76d6c1c72a Update Level
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2025-03-18 10:00:23 +01:00
NLSA 61b632cb4b Update Inputs as Optional
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2025-03-06 09:11:09 +01:00
NLSA 7e4e29c365 Update main.py
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2025-03-03 17:11:12 +01:00
4 changed files with 32 additions and 22 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.1.7
- uses: actions/setup-python@v5 - uses: actions/setup-python@v6
with: with:
python-version: '3.11' python-version: '3.11'
- name: Install poetry - name: Install poetry
+3
View File
@@ -1,3 +1,6 @@
![Blog Image_1920x1080 (3)](https://github.com/user-attachments/assets/b8f93e45-595e-4cad-bfc2-5fc830948e03)
# 🚀 Automate Revit Rooms and Areas Scheduling No Coding Required # 🚀 Automate Revit Rooms and Areas Scheduling No Coding Required
Easily export all **Rooms** and **Areas** by Level into an Excel file in seconds, ensuring **accurate and up-to-date project data**. This automation **eliminates manual effort**, **reduces errors**, and provides a **structured format** for further analysis. Easily export all **Rooms** and **Areas** by Level into an Excel file in seconds, ensuring **accurate and up-to-date project data**. This automation **eliminates manual effort**, **reduces errors**, and provides a **structured format** for further analysis.
+24 -19
View File
@@ -27,7 +27,7 @@ class FunctionInputs(AutomateBase):
file_name: str = Field( file_name: str = Field(
title="File Name", title="File Name",
description="The name of the Excel file.", description="The name of the Excel file to export.",
) )
inlcude_areas: bool = Field( inlcude_areas: bool = Field(
@@ -43,38 +43,45 @@ class FunctionInputs(AutomateBase):
) )
nua_list: str = Field( nua_list: str = Field(
title="NUA (Nett Usable Area)", title="NUA (Optional)",
strict= False description="Nett Usable Area",
default= ""
) )
nia_list: str = Field( nia_list: str = Field(
title="NIA (Nett Internal Area)", title="NIA (Optional)",
strict= False description="Nett Internal Area",
default= ""
) )
nla_list: str = Field( nla_list: str = Field(
title="NLA (Nett Leasable Area)", title="NLA (Optional)",
strict= False description="Nett Leasable Area",
default= ""
) )
gia_list: str = Field( gia_list: str = Field(
title="GIA (Gross Internal Area)", title="GIA (Optional)",
strict= False description="Gross Internal Area",
default= ""
) )
gea_list: str = Field( gea_list: str = Field(
title="GEA (Gross External Area)", title="GEA (Optional)",
strict= False description="Gross External Area",
default= ""
) )
gla_list: str = Field( gla_list: str = Field(
title="GLA (Gross Leasable Area)", title="GLA (Optional)",
strict= False description="Gross Leasable Area",
default= ""
) )
gba_list: str = Field( gba_list: str = Field(
title="GBA (Gross Building Area)", title="GBA (Optional)",
strict= False description="Gross Building Area",
default= ""
) )
@@ -122,20 +129,18 @@ def automate_function(
return return
items = [] items = []
id_lists = []
for i in all_objects: for i in all_objects:
if hasattr(i, "category"): # Check if the object has the "category" attribute 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 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 items.append(i) # Append the whole object to the items list
id_lists.append(i.id)
else: else:
continue # Skip if "category" does not exist continue # Skip if "category" does not exist
# List of properties # List of properties
list_prop = [ list_prop = [
"category", "category",
"level.name", "level",
"properties.Parameters.Instance Parameters.Identity Data.Name.value", "properties.Parameters.Instance Parameters.Identity Data.Name.value",
"properties.Parameters.Instance Parameters.Dimensions.Area.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.store_file_result(f"./{output_file}")
automate_context.mark_run_success("All data sent successfully! Download your file below.") automate_context.mark_run_success("All data sent successfully! Download your file below.")
except: 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 # Function to sum area for each group, ensuring missing levels return 0
+4 -2
View File
@@ -22,9 +22,11 @@ def test_function_run(test_automation_run_data: AutomationRunData, test_automati
automate_sdk = run_function( automate_sdk = run_function(
automation_context, automation_context,
automate_function, automate_function,
#These are test inputs, only work when testing localy.
FunctionInputs( FunctionInputs(
file_name="TestNameABC", file_name="TestName",
inlcude_areas= True, inlcude_areas= False,
inlcude_rooms= True, inlcude_rooms= True,
nua_list = "Elevator E1, Level 5 Gross, Live/Work Unit, Machine RM", nua_list = "Elevator E1, Level 5 Gross, Live/Work Unit, Machine RM",
nia_list = "", nia_list = "",