Close

Relief for ODA Team in Ukraine

Learn more
ODA BimRv SDK
Export to JSON Files

To export an .rvt/.rfa file to JSON format, use the TB_JsonExport module. You can export:

  • All parameters contained in ListParam for all objects in the model.
  • Hierarchy of a model's objects.

The TB_JsonExport module is used in the BmJsonExportEx sample application. This is a console application that demonstrates the export capabilities with the following startup parameters:

  • Input file — An input .rfa/.rvt file (required).
  • Output file — An output .Json file (optional).
  • Element handle — OdDbHandle of an OdBmElement for export (optional).
  • Flag — One of the following (required):
    • -p for exporting properties.
    • -h for exporting the object hierarchy.

    Must be the last argument.

The export example also works within the OdaBimApp sample application.

Export Parameters and Properties to a JSON Format File

To export parameters and properties:

  1. Open OdaBimApp and load any .rvt file.
  2. Choose File -> Export Property To Json.
  3. Select the path and name for the resulting .Json file.

To export parameters for one specific object:

  1. Right-click the desired object in the Element Table.
  2. Choose Export Property for this Element.
  3. Select the path and name for the resulting .Json file.

You can also select one of the drawn objects in the viewer:

  1. Choose Vectorize.
  2. Right-click the desired object.
  3. Choose Export Property for this Element.
  4. Select the path and name for the resulting .Json file.

The result of exporting the parameters is a .Json file with this structure:

Export the Hierarchy to a JSON Format File

All elements of an .rvt file model have the following hierarchy of elements:

  • Category — A classification attribute for model elements from a predefined list of classification attributes. All elements of the .rvt file belong to the categories list, and each element must belong to one of the categories. The list of categories is fixed and cannot be changed.
  • Family — A class of elements from an appropriate category. All elements of an .rvt file belong to a specific family. There are two main types of families:
    • System family (system) — Geometry objects whose behavior and characteristics are known in advance and cannot be changed.
    • Family of components — Geometry objects whose behavior and characteristics are created and can be edited by the user.
  • Type — A preserved and named variant of the family, usually based on standard sizes or other general characteristics.
  • Instance — An actual item from a model or a project. Depending on the definition of the category and family, an instance may have unique properties that are not type-controlled.

To export the hierarchy of objects:

  1. Open OdaBimApp and load any .rvt file.
  2. Choose File -> Export hierarchy To Json.
  3. Select the path and name for the resulting .Json file.

The picture below shows the result of hierarchy export:

See Also

Interaction with Other Formats

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.