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: 

Exterior Wall Face Length

1 REPLY 1
SOLVED
Reply
Message 1 of 2
charlv
1054 Views, 1 Reply

Exterior Wall Face Length

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.

1 REPLY 1
Message 2 of 2
saikat
in reply to: charlv

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



Saikat Bhattacharya
Senior Manager - Technology Consulting

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