:orphan:

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

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

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

The 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 
========================

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_INITIALIZE_DATA(A3DRWParamsLoadData, sReadParam);
   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: 

B-rep
=====

HOOPS Exchange currently does not support B-rep.

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.

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.
Also, colors on wires, faces, and tessellation are 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 on 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.

Restrictions
============

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 (e.g., pipes can be wireframe or solid), and this setting can be changed in Views. 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.
