Geometry |
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)


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);
}
}
}
}
}
