:orphan:

############
Revit Reader
############

.. rst-class:: format-title-block

+----------------------------------------------------------------------+
|                        **Revit**                                     |
+-----------------------------------------+----------------------------+
| **File Extension**                      | RVT, RFA                   |
+-----------------------------------------+----------------------------+
| **Supported Versions**                  | 2015 to 2026               |
+-----------------------------------------+----------------------------+
| **Platforms**                           | |wy| |ly| |mn| |an| |in|   | 
+-----------------------------------------+----------------------------+
| :ref:`revit_tessellation`               | |t_green| Supported        | 
+-----------------------------------------+----------------------------+
| :ref:`revit_brep`                       | |c_red| Unsupported        | 
+-----------------------------------------+----------------------------+
| **PMI**                                 | |c_red| Unsupported        | 
+-----------------------------------------+----------------------------+

Revit files are BIM formats used to store building models, including 
architectural, structural, and MEP elements with associated properties 
and relationships.

The HOOPS Exchange Revit Reader provides access to visualization data 
stored within a particular Revit file. 

A file does not need to have a particular extension to be read correctly by HOOPS Exchange. 
However, the file extension of Revit files that you can expect to be loaded by HOOPS Exchange is:

* `.RVT`
* `.RFA`

How to Import From Revit 
========================

Reading ``Revit`` files follows the same pattern as other formats: configure load parameters, then call the standard load function.

To load a Revit file, use :cpp:func:`A3DAsmModelFileLoadFromFile`.
The :cpp:struct:`A3DParamsLoadData` structure is used to customize the loading behavior:

.. code-block:: c

   A3DAsmModelFile* pModelFile = 0;

   A3DRWParamsLoadData sReadParam = A3D_MAKE_DATA(A3DRWParamsLoadData);
   sReadParam.m_sGeneral.m_bReadSolids = true;

   // ... set other A3DRWParamsLoadData fields as necessary

   A3DAsmModelFileLoadFromFile("path/to/file.rvt", &sReadParam, &pModelFile);

See :doc:`/guide/basic_operations/load_model` for more about loading model files.

.. _revit_tessellation: 

Tessellation
============

The triangle information is parsed and provided via HOOPS Exchange.

.. _revit_brep: 

Boundary Representation (B-rep)
===============================

HOOPS Exchange does not support B-rep for the Revit file format.

Assembly
========

RFA files (i.e., Revit families such as Doors and Windows) are supported. 
They are instantiated through Exchange's prototype mechanism.

Views
=====

Revit views are supported.

However, Exchange does not support all the features available in Revit.

Miscellaneous
=============

Supported
*********

* Visibility
* Camera
* Survey Coordinate System (exposed as the root coordinate system of the model)
* Project Coordinate System (exposed as metadata)
* LOD (Level-of-Detail: can be modified at import using the :cpp:enumerator:`~A3DERevitLevelOfDetail` option)

Unsupported
***********

* Rendering Mode
* Visibility Style
* Section Box
* 2D Drawing Views

Markup
******

Markups aren't currently supported by the HOOPS Exchange Revit reader.

Textures and Materials
**********************

HOOPS Exchange supports textures with Revit.
Colors on wires, faces, and tessellation are also supported.

Generally, Revit files reference textures which are part of a Revit installation.
This installation path is automatically added by Exchange _only_ if at least one custom path is provided into the texture search directories attribute of the read parameters (:cpp:member:`~A3DRWParamsGeneralData::m_ppcSearchTextureDirectories`).
This means that if you want HOOPS textures from the default installation path, you **must** add at least one value to :cpp:member:`~A3DRWParamsGeneralData::m_ppcSearchTextureDirectories`; Even an invalid path such as en empty string.

Metadata
********

HOOPS Exchange reads Revit metadata (properties) with their units.

Limitations
***********

* Revit is only available on 64-bit Windows and 64-bit Linux.

Geometry Representation
***********************

In Exchange, geometry is always represented as solid. 

In Revit, geometry may have different representations; For example, pipes can be wireframe or solid. 
This setting can be changed in Views. 
HOOPS Exchange does not support this concept.

Files with imported DWG parts are supported, but the visibility by default and per view will always be set to visible, even if visibility is set to another value in the original file.
