Description
The project Revit Meows simplifies data extraction from Revit model in ACC using the Model Derivative API. Leveraging powerful Python libraries, it enables efficient visualization and analysis of Revit data. The api released long time but quite complex and hard to use, this is library to help you access with easier way.
Installation
bash
pip install revit_meows --upgrade
Requirements
Python 3.9+
Setting Environment Variables, see Tutorial Create an App
bash
APS_CLIENT_PKCE_ID=your_client_id
APS_CLIENT_ID=your_client_id
APS_CLIENT_SECRET=your_client_secret
Simple Usage
- Get All Categories
python
from revit_meows import APSRevit
from aps_toolkit import Auth
token = Auth().auth3leg()
urn = "<urn of item version>"
revit_meows = APSRevit(urn, token)
categories = revit_meows.get_all_categories()
print(categories)
- Export All Revit Data To CSV
python
from revit_meows import APSRevit
from aps_toolkit import Auth
token = Auth().auth3leg()
urn = "<urn of item version>"
revit_meows = APSRevit(urn, token, region="US")
df = revit_meows.get_all_data()
df.to_csv("revit_data.csv")
- Export All Data Include Boundingbox To CSV
python
from revit_meows import APSRevit
from aps_toolkit import Auth
token = Auth().auth3leg()
urn = "<urn of item version>"
revit_meows = APSRevit(urn, token, region="US")
df = revit_meows.get_all_data_bbox(project_id="<project_id>",
model_guid="<model_guid>",
is_field_param=False,
is_include_category=True)
df.to_csv("revit_data_bbox.csv")
Features
- [x] Get All Revit Categories
- [x] Get Revit Data By Categories
- [x] Get All Revit Data From Model In ACC
- [x] Get Bounding Box of Revit Element data
Development Usage
pip install -e .
License
This project is licensed under the Apache License.
Contributing
This is project just research in my free time and don't have any power to keep it up to date. If you want to contribute, please feel free to fork and submit a pull request.
Learning Resources
Q&A
How can I get URN input?
- You can use
aps-toolkit
library to get URN of the item latest version.
python
from aps_toolkit import *
token = Auth().auth2leg()
bim360 = BIM360(token)
urn = bim360.get_latest_derivative_urn("<project_id>", "<folder_id>")
- You can batch report urn to dataframe from BIM360 class in
aps-toolkit
library.
python
from aps_toolkit import BIM360
from aps_toolkit import Auth
token = Auth().auth3leg()
bim360 = BIM360(token)
df = bim360.batch_report_items("<project_id>", "<folder_id>", ['.rvt'], is_sub_folder=False)