City2BIM Developer Documentation - dd-bim/City2BIM GitHub Wiki

Compiling and Developing for new Revit Version

In order to compile the Revit plugin, a reference to the RevitAPI.dll and RevitAPIUI.dll have to be specified. We substituted the reference to a local copy of the dlls to the usage of Nuget packages providing all recent Revit API versions. The used API version can be found in Visual Studio using Manage NuGet Packages on the Installed tab. Choose the Revit-Packages and on the right select the specific Revit version for changing to the required version.

New GDAL Version

If a new GDAL Version shall be used, possible changes in the original GDALConfiguration.cs have to be ported to City2RVT.utils.configureOgr(). This method enables all GDAL related functionality inside the Revit Context.

Shared Project CommonRevit

We decided to seperate the DataCatPlugin from the CityBIMPlugin. However both plugins in parts use the same codebase, e.g. with respect to the IFC Export. Therefore we added the shared project CommonRevit to the solution. This enables the plugin projects to use the same code and makes maintaining easier since the code has to be changed only at one place. Shared projects do not produce any output themselves and can not be build.

External DataCatalog Connection / DataCat

The flowchart briefly summarizes how the (meta) information about IfcClassifications and IfcClassificationReferences are added during our Ifc-Export.

Ablauf zum Erstellen der IfcClassification

Overview on used Extensible Storage Schemas

CityGMLImportSchema

Fieldname Fieldtype Explanation
NameOfImportedAttribute simple field
string
For every attribute a new field is created
All attribute values are stored as strings

HTWDD_TerrainID

Field Name Field Type Explanation
terrainID simple field
ElementId
Specifies the DTM that is used for draping GeoObjects on

ExternalDataCatalogSchema

Field Name Field Type Explanation
data map field
IDictionary<string, string>
key is name of selected subject
value is serialized JSON string of an Dictionary<string, string> containing property name and property value
ifcClassification simple field
string
serialized JSON string containing the hierarchy for the IfcClassification

GeoObjectUsageType

For ALKIS and XPlanung a separate schema is created for each individual "Layer"

Field Name Field Type Explanation
NameOfImportedAttribute simple field
string
For every attribute a new field is created
All attribute values are stored as strings

HTWDD_RefPlaneSchema

Field Name Field Type Explanation
RefPlaneElementIdToString map field
IDictionary<ElementId, string>
stores ElementIds for Refplane and corresponding name of the imported ALKIS / XPlanung layer

HTWDD_GeorefSchema

Field Name Field Type Explanation
ProjectScale simple field double stores project scale for the conversion between geo coordinates and BIM system
EPSGCode simple field int stores EPSG Code for the coordinates of the PBP

Wix Installer Project (Now using Wix4)

If a new Installer for a new Revit Version is needed the Wix Installer Project has to be build. There is a Wix installer project for both the CityBIM plugin and the DataCat plugin.

It is important to consider the following:

  • The plugin is installed to ProgramData\Autodesk\Revit\Addins\RevitVersionYear
  • The name of the Year-Directory must be adjusted to the desired Revit version year. This has to be done in the Package.wxs file that is specifying the directory structure of the plugins. Change the Nameproperty in the Directory with id=YearDir to the corresponding Revit Version
  • The installer project uses the Wix utility heat to harvest the output directories of the referenced projects. Harvesting means that all files that are located in the bin directory of the referenced and built project are collected and added to the final installer.
  • The UpgradeCode should never change for newer releases.

Useful Information in book: WiX 3.6: A Developer's Guide to Windows Installer XML

⚠️ **GitHub.com Fallback** ⚠️