Using a geometry viewer in a revit addin to preview results

Using a geometry viewer in a revit addin to preview results

jesse.mom
Contributor Contributor
7,943 Views
22 Replies
Message 1 of 23

Using a geometry viewer in a revit addin to preview results

jesse.mom
Contributor
Contributor

Hi all,

I'm trying to build a revit addin that will generate geometry in revit. In my addin, I would like to integrate an interactive 3D viewer that shows a preview of the geometry that will be generated. Basically, i'm looking for functionality such as the revit extensions offered by Autodesk, specifcally the "Wood Framing Walls" extension. In this extension, you can configure something, and see a preview of what will be generated in revit. (see attached image).

 

My question: does anyone have suggestions for open source or free 3D geometry viewers that can be included in a revit addin to preview geometry that has not yet been created in revit? Specifcally, does anyone know whether the viewer used for the revit extensions has some kind of API or is publically available somewhere( since I like the look and feel of it)?  Or is this something Autodesk can make available? The geometry to preview are simple beam shaped elements and lines, just like the example in the picture. 

 

I've found the articles by Jeremy on his building coder blog

7,944 Views
22 Replies
Replies (22)
Message 21 of 23

CaoduroC
Enthusiast
Enthusiast

A little bit later on this conversation but I would like to understand how can be possible to introduce the Revit viewer in a modeless application. Using Helix is fine but I have seen tools like Sofistik Bridge using an interactive Revit view within the form. 
Is there any documentation around this?

0 Likes
Message 22 of 23

folkert.van.leeuwen
Participant
Participant

Hi, 

 

I took a quick look at the Sofistik Bridge tool for Revit.

 

What i can see is that they don't use Helix as we did in this topic. They use the PreviewControl class.

You can only show existing Views and control the navigations in the winform and very easy to set up!

 

Revit API:

https://www.revitapidocs.com/2015/50112279-5c9d-0351-bbd1-698e76be9e36.htm 

 

Examples:

https://spiderinnet.typepad.com/blog/2014/12/revit-net-api-create-custom-preview-control-previewcont... 

 

Good luck!

0 Likes
Message 23 of 23

jeremy_tammik
Alumni
Alumni

The Building Coder has a whole topic group with information on the PreviewControl:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.7

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes