| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Beautiful transient geometry display directly in Revit 3D views, integrated with trace logging.
The Geometry Visualization system allows you to display transient geometry directly in the Revit 3D view, similar to Dynamo's preview functionality but integrated into your development workflow.
Ensure the logger is started (geometry tracing is automatically enabled).
// Trace a face
Face face = GetSomeFace();
Trace.Write(face);
// Trace a curve
Curve curve = GetSomeCurve();
Trace.Write(curve);
// Trace a solid
Solid solid = GetSomeSolid();
Trace.Write(solid);
// Trace a mesh
Mesh mesh = GetSomeMesh();
Trace.Write(mesh);
// Trace a point
XYZ point = new XYZ(10, 20, 30);
Trace.Write(point);
// Trace a bounding box
BoundingBoxXYZ bbox = element.get_BoundingBox(null);
Trace.Write(bbox);// Trace multiple faces
var faces = new List<Face> { face1, face2, face3 };
Trace.Write(faces);
// Trace multiple curves
var curves = selectedElements.SelectMany(e => GetCurvesFromElement(e));
Trace.Write(curves);
// Trace multiple solids
var solids = elements.SelectMany(e => e.GetSolids());
Trace.Write(solids);
// Mixed geometry types
var geometries = new List<GeometryObject> { face, curve, solid };
Trace.Write(geometries);import clr
clr.AddReference("RevitAPI")
# For Revit 2025 onward:
clr.AddReference("System.Diagnostics.TraceSource")
from Autodesk.Revit.DB import *
from System.Diagnostics import Trace
from System.Collections.Generic import List
# Trace individual geometry
face = GetSomeFace() # Your method to get a face
Trace.Write(face)
# Trace collections
curves = List[Curve]()
curves.Add(curve1)
curves.Add(curve2)
Trace.Write(curves)
# Trace points
point = XYZ(10, 20, 30)
Trace.Write(point)See complete working examples in the repository:
C# Examples:
Python Examples:
From UI:
From Code:
// Clears all visualized geometry
// (Not exposed via API yet - use UI button)| Back | FazBrowse Home | New Git URL |