Temporary Graphics like GRDRAW or GRVECS

Temporary Graphics like GRDRAW or GRVECS

mertens3d
Enthusiast Enthusiast
1,536 Views
4 Replies
Message 1 of 5

Temporary Graphics like GRDRAW or GRVECS

mertens3d
Enthusiast
Enthusiast

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?

 

0 Likes
Accepted solutions (3)
1,537 Views
4 Replies
Replies (4)
Message 2 of 5

Joe.Ye
Alumni
Alumni
Accepted solution

 

Revit doesn't expose the API to create transient/temporary graphics.

Revit engineering team knew this API request.



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 5

arnostlobel
Alumni
Alumni
Accepted solution

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

Arnošt Löbel
0 Likes
Message 4 of 5

mertens3d
Enthusiast
Enthusiast

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

 

 

 

 

0 Likes
Message 5 of 5

Revitalizer
Advisor
Advisor
Accepted solution

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




Rudolf Honke
Software Developer
Mensch und Maschine