Close

Relief for ODA Team in Ukraine

Learn more
ODA BimRv SDK
Export BimRv File Content to SVG Format

SVG Overview

The Scalable Vector Graphics (SVG) format is an XML-based format that is used for vector graphics representation. This format supports both static and animated graphical objects. SVG is widely used for exchanging drawing information between different software applications (graphical editors, CAD software, web-browsers, etc.). The main advantage of the vector representation is its scalability: it is possible to scale a vector image without quality loss (in contrast to a raster image).

An .svg file contains a set of two-dimensional vector descriptions, vector primitives and raster graphics definitions:

  • Geometry primitives: points, lines, rectangles, circles, ellipses, broken lines, polygons.
  • Raster pictures.
  • Links to outside resources.

Exporting to SVG

To export an .rvt/.rfa file from ODA BimRv SDK to SVG, use the TD_SvgExport module that contains a special class SvgExportCommand. This class implements a custom command for exporting to the SVG format.

The SvgExportCommand class provides the following functionality:

  1. Creates a device for exporting to an .svg file. This device inherits the OdGiGeometrySimplifier class that implements simplifying and transferring geometry data from the vectorization framework.
  2. Retrieves export parameters from a user (a path to the output .svg file, a lineweight scale, floating point operations precision, etc).
  3. Gets access to the OdDbBaseDatabasePE protocol extension object passed to the command within a command context instance and prepares a graphical interface context for the device.
  4. Runs the rendering with the created device and gathers the output using the OdGiGeometrySimplifier class.

Currently ODA BimRv SDK can export graphics (edges).

This command is included in the OdaBimApp sample application, which is available only for Windows platforms.

To export your BimRv file (.rvt/rfa) using the OdaBimApp sample application:

  1. Run OdaBimApp.
  2. Choose File -> Open to open an .rvt/.rfa file.

  3. Choose File -> Export To Svg, then specify the output .svg file name.

  4. To see the result, open the output .svg file with any browser:

Details about the SVG export parameter are described in ODA Drawings SDK documentation.

See Also

Convert OdDb Geometry and SAT Data to DirectShape

Export to a Raster File

Export to a .pdf File

Export to a Collada File (.dae File)

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