Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Temporary Graphics like GRDRAW or GRVECS

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
mertens3d
1174 Views, 4 Replies

Temporary Graphics like GRDRAW or GRVECS

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?

 

4 REPLIES 4
Message 2 of 5
Joe.Ye
in reply to: mertens3d

 

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
Message 3 of 5
arnostlobel
in reply to: Joe.Ye

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
Message 4 of 5
mertens3d
in reply to: arnostlobel

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

 

 

 

 

Message 5 of 5
Revitalizer
in reply to: mertens3d

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





Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community