Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66683

Re: Dimension between walls corners using Revit's API

$
0
0

Three days later and I've made it work!

 

I currently :

  1. Get the exterior face reference with HostObjectUtils,
  2. Get the actual face using GetGeometryObjectFromReference(),
  3. Extract the geometry from the wall using an Options object that gathers references,
  4. Compare all the faces on the Solid of the wall to the exterior face I got in step 2 to get the exterior face with references,
  5. Get all the edges of the face with 
  6. Evaluate(0.5) all the edges of that face to get the midpoint and therefore a general idea of where that edge is in the world,
  7. Ordering the edges in a list such that the edge with the midpoint with the lowest Z value is first and the highest Z value is last,
  8. Subtracting the lowest Z (First()) from the highest Z (Last()) to get the "height" of the wall,
  9. Add a third of the height to the lowest Z to get a "maximum height" in worldspace,
  10. Remove any edges from the list who's midpoint's (Evaluate(0.5)) Z is higher than the maximum height.
  11. Get the first end Reference of the First() edge in the list and the last end Reference of the Last() edge of the list.
  12. Dimension between those References.

 

 

 


Viewing all articles
Browse latest Browse all 66683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>