Transform Property


Geometry Instance Transform Property

The affine transformation from the local coordinate space of the symbol into the coordinate space of the instance.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public Transform Transform { get; }

Property Value

Transform
Example
public void GetAndTransformCurve(Autodesk.Revit.ApplicationServices.Application app, 
    Autodesk.Revit.DB.Element element, Options geoOptions)
{
    // Get geometry element of the selected element
    Autodesk.Revit.DB.GeometryElement geoElement = element.get_Geometry(geoOptions);

    // Get geometry object
    foreach (GeometryObject geoObject in geoElement)
    {
        // Get the geometry instance which contains the geometry information
       Autodesk.Revit.DB.GeometryInstance instance = 
           geoObject as Autodesk.Revit.DB.GeometryInstance;
        if (null != instance)
        {
            foreach (GeometryObject o in instance.SymbolGeometry)
            {
                // Get curve
                Curve curve = o as Curve;
                if (curve != null)
                {
                    // transfrom the curve to make it in the instance's coordinate space
                    curve = curve.CreateTransformed(instance.Transform);
                }
            }
        }
    }
}
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →