Is there a way in the Revit API to draw temporary graphics like in autolisp (GRDRAW or GRVECS)?
I have a routine that is rotating line/ wall elements. But the rotation point can be either end point or the middle. I'd like a graphical way to indicate to the user which point will be used for the rotation.
Ideas?
Solved! Go to Solution.
Solved by Revitalizer. Go to Solution.
Solved by arnostlobel. Go to Solution.
Solved by Joe.Ye. Go to Solution.
Revit doesn't expose the API to create transient/temporary graphics.
Revit engineering team knew this API request.
Depending on what exactly needs to be temporarily displayed, the Visualization Analysis API can be of use in some cases. Please consider exploring the Revit.DB.Analysis namespace along with samples provided in the SDK.
Arnošt Löbel
Autodesk Revit R&D
Thanks both.
I will check out the VA api.
To start with, all I really need to do is draw either an arrow or a circle in plan view arond / pointing at a specific coordinate.
We'll see what happens...
My backup plan is to reproduce the info in a pictureBox on the form.
I also thought about popping up a seperate form that has an arrow on it (rotated correctly) and move that dialog so that it points to the correct spot. I'm not even sure if this can be done and it feels a bit messy. (But I think I remember someone posting code where they had figured out how to translate revit coordinates to windows screen coordinate).
Hi mertens3d,
you could simulate some sort of temporary geometry by drawing DetailLines (or better circles/DetailArcs because you want to show 'points') on the locations the user may pick (Selection.PickPoint(ObjectSnapTypes.Midpoints | ObjectSnapTypes.Endpoints) etc.)
Just delete them after performing your other stuff.
Cheers,
Revitalizer