Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Creating alternate representation of Revit element

ralvarez1976
Enthusiast

Creating alternate representation of Revit element

ralvarez1976
Enthusiast
Enthusiast

Hello

 

Is it possible to create an alternate representation of a Revit element with the Revit API and Analysis Visualization Framework? Here are some examples:

 

1. Display the outer or inner face of a wall with a different color, and be able to isolate this new surface in a view.

Wall Surface Display.PNG

2. Generate curves based on the panel edges of a Curtain Wall, and isolate the outer surface of the curtain panels.

Curtain Wall Grids and Faces.PNG

These elements would only display in specific views, and their geometry would be stored in the database after running the API tool.

 

Thanks in advance!

0 Likes
Reply
595 Views
8 Replies
Replies (8)

cwaluga
Advocate
Advocate

Have a look at DirectShape creation.

https://thebuildingcoder.typepad.com/blog/2018/01/directshape-topics-and-happy-new-year.html

These elements can be given a (sub)category which can be used to control materials and visibility per view.

0 Likes

BenoitE&A
Collaborator
Collaborator

Another hint: maybe use the Level Of Detail ? 


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes

ralvarez1976
Enthusiast
Enthusiast

Can DirectShapes be created on the fly and update when the original element changes? I was hoping to create a representation only, not an entirely new element that would weight down the database.

0 Likes

ralvarez1976
Enthusiast
Enthusiast

Level of detail can show less detail within the same element thickness. It essentially just hides the components. I actually want to show only the exterior face of an element, or certain edges, if possible. 

0 Likes

cwaluga
Advocate
Advocate

This does not sound like your original question “These elements would only display in specific views, and their geometry would be stored in the database after running the API tool.”

 

You could look at the DirectContext3D API example in the SDK then.

0 Likes

BenoitE&A
Collaborator
Collaborator

"It essentially just hides the components."

No that's not what LOD do. You can draw different details depending on the LOD.

The basic point is:

- are all your model from the same firm/architects? If yes, you can modify the families in order to create your reprentations and this looks a lot easier to me than going to fetch in the DirectX SDK (but it's less geeky ;))

- if not, then indeed you should not consider a solution using families but rather modifying the image treatment...

 


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes

ralvarez1976
Enthusiast
Enthusiast

@BenoitE&A

 

LOD just hides aspects of a wall in the example I noted. In loadable families LOD can show and hide what you want. However, for system families the functionality is built-in and cannot be controlled. My question is about manipulating the representation of built in system families.

 

I have done alternate representations in loadable families, and that is easy to do. The harder part is with system families. I am looking for a more robust solution that is code based.

0 Likes

BenoitE&A
Collaborator
Collaborator

Ok thanks for the explanation. 

Then good luck for the coding 😉


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes