How to draw transient graphics in Revit

How to draw transient graphics in Revit

845179011
Enthusiast Enthusiast
1,823 Views
2 Replies
Message 1 of 3

How to draw transient graphics in Revit

845179011
Enthusiast
Enthusiast

Hi, everyone.

I want to draw 2d texts in view, like Transient Graphics in AutoCAD. These texts draw upon all model elements and will  not change the size while scaling view. This can be applied to a situation that when the Grid names are out of view, the texts respresenting the grids display at the edge of view, so the user can easily know the current position while modeling.

Can anyone give me some advice? Thanks.

0 Likes
Accepted solutions (1)
1,824 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Two pieces of Revit API functionality come to mind: the older Analysis Visualisation Framework or AVF and the more recent DirectContext3D.

 

AVF is designed for displaying structural and other analysis results on the BIM element faces. The Building Coder has presented numerous examples in the past, starting with the decade-old Revit webcam.

 

DirectContext3D is for displaying external graphics in the context of a Revit model:

 

 

For your use case, however, I can well imagine that a simpler and more effective solution can be implemented independently of Revit and its API, by making use of the native Windows API or .NET libraries. However, that lies outside my area of expertise, so I have no specific advice to offer in that area. Except: maybe you can simply use the DrawText function from winuser.h.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

jeremytammik
Autodesk
Autodesk
0 Likes