Walls/Windows Info(length, direction, area) from an Arch Link using Spaces

I am trying to get the walls and windows information (length, direction, area) from an Architecture Link using Spaces in my Mechanical file. Is there any way I can do it through Revit API or dynamo? I was able to get this in the Architectural model using Rooms (in dynamo) but it gives me the length of the original wall and not the wall length that is part of the room. I still prefer to get it using Space in the Mechanical file(with Architecture file Linked). Please let me know if anyone has a solution.

Thanks,
Bishesh