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: 

API access to void Form in Conceptual Model

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
856 Views, 4 Replies

API access to void Form in Conceptual Model

I have a question someone could hopefully help me with.. We're working with analysing Conceptual mass models. Using the Revit API, we extract the geometry Faces from the mass instance, apply a compass orientation to each Face which we can then use with our own API to apply solar loads etc. etc.
 
I have noticed that if I create a mass using a cube shape say & then use a void form to further shape it, the orientations of the geometry Face I get from the wall surfaces adjacent to the void form are reversed. That is, a face that logically should be orientated to 'East' for example, is coming up as facing 'West'.
 
I'm guessing that I need to find the void form from the Document to identify adjacencies with the mass instance solid. The question is: does the Revit API give access to retrieving Void form elements via filtering etc.? I haven't been able to get anything so far. 
 
Hopefully I've expressed the problem clearly.. 
Thanks for your time!
4 REPLIES 4
Message 2 of 5
jeremytammik
in reply to: Anonymous

Dear Edwin,

 

Happy New Year to you and thank you for submitting your question here on the Revit API forum.

 

Yes, indeed, I have run into that issue in the past already: an isolated face may have its normal vector reversed compared to the face retrieved from the solid it belongs to.

 

Yes, of course you can retrieve the void form elements from a family via a filtered element collector.

 

As always, you can use the RevitLookup database exploration tool to explore the family database elements and their properties to research how to set up an appropriate filter:

 

https://github.com/jeremytammik/RevitLookup

 

RevitLokup is compiled and therefore displays property values, but does not evaluate all object methods.

 

If you need a more interactive Revit API exploration, you can try out the Revit Ruby and Python shells:

 

http://thebuildingcoder.typepad.com/blog/2013/11/intimate-revit-database-exploration-with-the-python...

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 5
Anonymous
in reply to: jeremytammik

Thanks Jeremy,

 

I'll proceed as you suggest & post the filter code once I've worked it out.

Message 4 of 5
jeremytammik
in reply to: Anonymous

Thank you!

 

Please also note what Revitalizer just pointed out in a separate thread:

 

PlanarFace.Normal does not reliable give you a vector directing outwards.

 

RevitAPI.chm says: "This property is the 'surface normal' vector. This is not necessarily the normal vector pointing out of the solid that contains the face, to get that value use ComputeNormal(UV)."

 

Cheers,

 

Jeremy

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 5
Anonymous
in reply to: jeremytammik

Thanks very much Jeremy!

 

The PlanarFace's Normal property vs the ComputeNormal method's return value was the missing piece of the puzzle..

 

I can only echo jasonkhc & say that you guys are most helpful!

 

Cheers,

Edwin

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