GeometryInstance
An instance of another element (symbol), specially positioned by this element.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.GeometryInstance
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class GeometryInstance : GeometryObject
The GeometryInstance type exposes the following members.
Properties
Name
Description
Public Property
Code Example
GraphicsStyleId
The ElementId of the GeometryObject’s GraphicsStyle
(Inherited from GeometryObject)
Public Property
Id
A unique integer identifying the GeometryObject in its associated non view-specific GeometryElement.
(Inherited from GeometryObject)
Public Property
IsElementGeometry
Indicates whether this geometry is obtained directly from an Element.
(Inherited from GeometryObject)
Public Property
Code Example
IsReadOnly
Identifies if the object is read-only or modifiable.
(Inherited from APIObject)
Public Property
SymbolGeometry
The geometric representation of the symbol which generates this instance.
Public Property
Code Example
Transform
The affine transformation from the local coordinate space of the symbol into the coordinate space of the instance.
Public Property
Visibility
The visibility.
(Inherited from GeometryObject)
Methods
Name
Description
Public Method
Dispose
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public Method
Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from GeometryObject)
Public Method
GetDocument
Gets the document that contains the symbol of this instance.
Public Method
GetHashCode
Gets the integer value of the geometry object as hash code
(Inherited from GeometryObject)
Public Method
GetInstanceGeometry.
Computes the geometric representation of the instance.
Public Method
GetInstanceGeometry(Transform)
Computes a transformation of the geometric representation of the instance.
Public Method
GetSymbolGeometry.
Computes the geometric representation of the symbol which generates this instance.
Public Method
GetSymbolGeometry(Transform)
Computes a transformation of the geometric representation of the symbol which generates this instance.
Public Method
GetSymbolGeometryId
Gets the SymbolGeometryId that contains data about the symbol of this instance.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
A GeometryInstance represents a set of geometry stored by Revit in a default configuration, and then transformed into the proper location as a result of the properties of the element. The most common situation where GeometryInstances are encountered is in Family instances. Revit uses GeometryInstances to allow it to store a single copy of the geometry for a given family and reuse it in multiple instances. Note that not all Family instances will include GeometryInstances. When Revit needs to make a unique copy of the family geometry for a given instance (because of the effect of local joins, intersections, and other factors related to the instance placement) no GeometryInstance will be encountered; instead the Solid geometry will be found at the top level of the hierarchy. Another example of GeometryInstance usage is in Rebar element visible in fine 3D Views. Here, each segement of a rebar is a GeometryInstance. In this case the Symbol Element is contaning all the geometries that are instanced. A GeometryInstance offers the ability to read its geometry through the GetSymbolGeometry() and GetInstanceGeometry() methods. These methods return another Autodesk.Revit.DB.GeometryElement which can be parsed just like the first level return.