A lightweight gbXML export module for Revit, WIP. Sometimes we find the Revit model much too complex for an accurate and lightweight gbXML export. There may be broken space boundaries, shattered surfaces, or tiny twisted patches, thus leading to failures in the building energy simulation. In this toy project we provide a simple BREP-like space crafting plugin with fuzzy space detection and simplification, aside from the native gbXML export module either based on room/space definition or energy analysis model.
gingerbread
├ /docs
└ /Gingerbread
├ /Properties - Assembly info
├ /Resources
│ ├ /ico - Icons
│ ├ /lib - Clipper.cs
│ └ /spider - Spider gbXML viewer
├ /Views - WPF functions
├ /Core - Basic Algorithms
├ App.cs - App entry
├ Cmd*.cs - Button entry
├ Ext*.cs - External event
├ Util*.cs - Utility functions
└ Gingerbread.addin - App manifest
Dependency
Compile
if exist "$(AppData)\Autodesk\REVIT\Addins\2023" copy "$(ProjectDir)*.addin" "$(AppData)\Autodesk\REVIT\Addins\2022"
if exist "$(AppData)\Autodesk\REVIT\Addins\2023" mkdir "$(AppData)\Autodesk\REVIT\Addins\2022\Gingerbread" mkdir "$(AppData)\Autodesk\REVIT\Addins\2022\Gingerbread\Spider"
copy "$(ProjectDir)$(OutputPath)*.dll" "$(AppData)\Autodesk\REVIT\Addins\2023\Gingerbread"
copy "$(ProjectDir)$(OutputPath)\Resources\spider\*.*" "$(AppData)\Autodesk\REVIT\Addins\2023\Gingerbread\Spider"
Demo
Project is under development, with Document / Log updated once in a while.
Test it with Technical_school-current_m.rvt
shipped with Revit.
Note
Some notes about the WPF and CefSharp
BaseWindow.cs
and BaseWindowStyle.xaml
and see how that works.Properties.Settings.Default
to cache some user settings and bind them in XAML textbox.Delegate
and Dispatcher
, a progressbar is added to the main window monitoring the processing of an external event. DoEvent
is not optimal. Here's a great sample of this kind of progressbar: engthiago/WPFMonitorRevitAPIIf you got better solution please let me know. Many thanks.