You can do all that without using Dynamo (use Schedules in Revit).
Best practice is (in my opinion) to make wall types for interior use and wall types for exterior use (so you can filter).
In Revit you can already see the area.
Revit already subtracts openings for you.
In the Family you can add a (Shared) Parameter and use a formula to get the Area (Width x Height).
I don’t wanna sound rude, but seeing your questions i have my doubts about your Revit knowlage…
It’s a MUST to do it with Dynamo because it’s university project. I know what is Google. I know how Revit can do it. My question was totally related to DYANMO. If you do not have Dynamo knowledge please don’t put irrelevant comments under my post.
Collect all the walls with an all elements of category node
Get the wall type for each wall, a necessary step as the use is a type parameter
Get the use parameter for each type. Note that this may return an integer value, where the value corresponds to a selection in the list options (ie: foundation, exterior, interior, soffit, etc. would map to 0,1,2,3,4…).
Test these values for being equal to the target value (ie: if you know one exterior wall has a value of ‘4’ then you want a Boolean of true for each value of 4, and a false Boolean for any other value.
Use the list of Booleans to filter out walls in the original list of walls (the instances from the all elements of category) to remove walls which do not have a type with a use that is ‘exterior’.
Get the area of the wall with an Element.GetParametervalueByName node. This will give you the value stored in the instance’s area parameter, which is usually mostly correct some of the time on occasion (just in case the many qualifiers I put in there didn’t make it abundantly clear: I wouldn’t blindly rely on that number).
Thank you so much for your help. Would you please explain what do you mean by “use parameter”?
I attached a screenshot of my work. I calculated the area of windows perfectly, but still cant filter the walls.
Element.GetParameterValueByname is the node you want. The parameter name input should be “Function”, as a string.
Definitely feels like you might be biting off more than you can chew in a hurry though - you may want to do some crawling and go though the Dynamo Primer before you jump into building a graph from scratch.