Hello,
Is there a way to draw an image over the ActiveView. I am trying to achieve the same look and feel as the one that you get when you go to View->Render and hit the Render button. The image will be produced by a third-party renderer but I can't find a way to draw this image over the current ActiveView.
Any ideas?
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Yes, sure.
Check out DirectContext3D:
http://thebuildingcoder.typepad.com/blog/2017/04/whats-new-in-the-revit-2018-api.html#3.26
Cheers,
Jeremy
I looked around the DirectContext3D namespace, IDirectContext3DServer and DrawContext, but this is not what I am looking for.
Maybe I did not ask my question correctly.
I don't want to supply Revit with vertices and indices and let it draw them.
What I am looking for is to replace the image generated by Revit after the user clicks the "Render" button with my own image. Revit should not render anything -- V-Ray will do this job and will provide the rendered image. For example every other second.
I have attached a screenshot.
Thanks.
I do not think Revit supports this out of the box.
On the other hand, I do think that other developers have achieved similar effects.
Maybe they use the Windows API to do so?
Thank you for the information.
Is there an example of implementing the DirectContext3D.IDirectContext3DServer interface and using DrawContext.FlushBuffer? I browsed Revit 2018 SDK Samples, but could not find one. Google does not return anything either.
Dear Rossen,
I am checking with the development team for you.
Cheers,
Jeremy.
Dear Rossen,
I am attaching the DuplicateGraphics SDK sample to this message.
It was not published with the Revit 2018 RTS SDK for technical reasons.
I hope it provides all you need to understand how to work with DirectContext3D.
Have fun!
Cheers,
Jeremy.
Thank you for your appreciation.
Please let us know how you end up making use of it.
Thank you!
Cheers,
jeremy
Hello,
I managed to run the sample and make a wall appear twice 😉 Now I need to find a clever and efficient way to draw an image bitmap pixel by pixel using DrawContenxt.FlushBuffe. The thing is, we want to render a bitmap image rendered by V-Ray over the Revit view and not create vector graphics.
Best Regards,
Rossen
Published on The Building Coder now as well:
http://thebuildingcoder.typepad.com/blog/2017/05/revit-2017-and-2018-sdk-samples.html
Cheers,
Jeremy
How did you get it to run? It doesn't seem to do anything for me. I pick a wall and nothing happens. Looking at the code, there appears to be a few methods that aren't hooked up. When I tried adding one of them into the command run, I get an error in Revit.