Skip to content

An library easy to read data and export revit data from native revit format

License

Notifications You must be signed in to change notification settings

chuongmep/revit-extractor

Repository files navigation

Platform License: GNU v3

PyPI PyPI - Downloads

follow on Twitter

Revit Extractor

Revit Extractor is a library that allows you to export native data from Revit files without needing to open Revit. It’s particularly useful for extracting data from Revit files and integrating it into other systems.

Requirements

  • Make sure you have Revit installed on your machine.
  • Make sure you have Python installed on your machine version 3.9 or later.
  • Make sure you are running on Windows Platform. MacOS and Linux are not supported.

How to use

  1. Install the library by using pip:
pip install revit-extractor --upgrade
  1. Get Revit Version
from revit_extract import RevitExtractor
rvt_path = r"D:\_WIP\Download\Sample Office Building Model V1.rvt"
version = RevitExtractor.get_version(rvt_path)
print(version)
  1. Use the library in your code:
  • Extract all categories from Revit file:
from revit_extract import RevitExtractor
rvt_path = r"D:\_WIP\Download\Sample Office Building Model V1.rvt"
prodb = RevitExtractor(rvt_path).read_prob_data()
categories = prodb.get_all_categories()
for key in categories:
    print(key, categories[key])
  • Extract data by categories and parameters from Revit file:
from revit_extract import RevitExtractor
rvt_path = r"D:\_WIP\Download\Sample Office Building Model V1.rvt"
prodb = RevitExtractor(rvt_path).read_prob_data()
categories =["Walls", "Doors"]
params = ["Name", "Type", "Level"]
data_frame = prodb.get_data_by_categories_and_params(categories, params)
data_frame.to_excel("output.xlsx", index=False)

Check Example Files

Limitation

  • Export Schedule table data is not supported with svf format.

  • Geometry data is limit supported to read at the moment (But can export and use APS-Toolkit)

Disclaimer

This is not an official Autodesk product to support for Autodesk Platform Services. Use it at your own risk.

I'm not responsible for any data loss or any other issues caused by using this library, some features need require cost for using. Please read carefully the Autodesk Forge and Autodesk Platform Services terms of use. I'm just doing, testing , maintaining in free time, so feel free to contribute and make it better.

License

This project is licensed under the GNU v3 License - see the LICENSE file for details

References

Disclaimer

This is not an official method recommended by Autodesk, for academic purposes only, please use Design Automation or official support services from Autodesk like AEC Data Model API

About

An library easy to read data and export revit data from native revit format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages