The Autodesk.Revit.DB.Analysis.GenericZone
class is a component of the Revit API which represents a generic analysis zone. It is used in analytical applications for Revit, such as energy analysis or thermal analysis.
The GenericZone
class has the following properties:
BoundaryFace
(read-only): The face of the building element that represents the boundary of the zone.BoundaryElements
(read-only): A collection of elements that define the boundary of the zone.Level
(read-only): The level on which the zone is located.Perimeter
(read-only): The perimeter of the zone.Volume
(read-only): The volume of the zone.The GenericZone
class has the following methods:
Create
: Creates a new GenericZone
object with the specified parameters.ExportToJSON
: Exports the zone data to a JSON format.ImportFromJSON
: Imports zone data from a JSON format.The following code demonstrates the use of the GenericZone
class:
// Create a new GenericZone object
GenericZone zone = GenericZone.Create(doc, elementIds, level);
// Get the perimeter of the zone
double perimeter = zone.Perimeter;
// Export the zone data to JSON
string json = zone.ExportToJSON();
// Import zone data from JSON
GenericZone importedZone = GenericZone.ImportFromJSON(doc, json);
In this example, a new GenericZone
object is created using the Create
method with the specified parameters. The Perimeter
property is then accessed to retrieve the perimeter of the zone. The ExportToJSON
method is used to export the zone data to a JSON format, which can be imported later using the ImportFromJSON
method.
The Autodesk.Revit.DB.Analysis.GenericZone
class is an important component of the Revit API used in analytical applications. It provides access to the boundary, level, perimeter, and volume of a zone, and can be exported and imported in a JSON format.