GeometryInstanceTransform Property |
The affine transformation from the local coordinate space of the symbol into the
coordinate space of the instance.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic Transform Transform { get; }
Public ReadOnly Property Transform As Transform
Get
public:
property Transform^ Transform {
Transform^ get ();
}
member Transform : Transform with get
Property Value
Transform
Examplepublic void GetAndTransformCurve(Autodesk.Revit.ApplicationServices.Application app,
Autodesk.Revit.DB.Element element, Options geoOptions)
{
Autodesk.Revit.DB.GeometryElement geoElement = element.get_Geometry(geoOptions);
foreach (GeometryObject geoObject in geoElement)
{
Autodesk.Revit.DB.GeometryInstance instance =
geoObject as Autodesk.Revit.DB.GeometryInstance;
if (null != instance)
{
foreach (GeometryObject o in instance.SymbolGeometry)
{
Curve curve = o as Curve;
if (curve != null)
{
curve = curve.CreateTransformed(instance.Transform);
}
}
}
}
}
Public Sub GetAndTransformCurve(app As Autodesk.Revit.ApplicationServices.Application, element As Autodesk.Revit.DB.Element, geoOptions As Options)
Dim geoElement As Autodesk.Revit.DB.GeometryElement = element.Geometry(geoOptions)
For Each geoObject As GeometryObject In geoElement
Dim instance As Autodesk.Revit.DB.GeometryInstance = TryCast(geoObject, Autodesk.Revit.DB.GeometryInstance)
If instance IsNot Nothing Then
For Each o As GeometryObject In instance.SymbolGeometry
Dim curve As Curve = TryCast(o, Curve)
If curve IsNot Nothing Then
curve = curve.CreateTransformed(instance.Transform)
End If
Next
End If
Next
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also