Hi all,
Is there any way to access a wall parameter/property that will return the wall's external face's length ( not the wall length but the the external length of the face of the wall. )
Any ideas.
Thanks in advance.
Charl.
Solved! Go to Solution.
Solved by saikat. Go to Solution.
Hi Charl
There isnt any one step approach to this but you should be able to get the length of the exterior face of the wall using the following workflow -
1) Using the following two lines of code, you should be able to access the exterior face of the wall:
// Get the side faces
IList<Reference> sideFaces = HostObjectUtils.GetSideFaces(pickedWall, ShellLayerType.Exterior);
// access the side face
Face face = doc.GetElement(sideFaces[0]).GetGeometryObjectFromReference(sideFaces[0]) as Face;
2) with this exterior face, access the edgeloops on the face and acess each edge
3) iterate through each edge and figure out the edge that is same as the length of the wall (horizontal edges) and ignore the vertical edges
4) Access the ApproximateLength property for the edge and this should return the length of the exterior face of the wall.
Hope this helps
Cheers
Saikat