Can we make a wall property using "Expressions" that automatically recognizes its own orientation to project origin?
My thoughts are to identify wall’s start/end X and Y coordinates, apply simple “cos” and “sin” for recognizing wall's vector direction and then use “wall orientation” property (left or right of reference line) as a condition to name the orientation as N, W, S or E.
Problem is – how to make a Property that identifies start/end X and Y coordinates of any wall (or any other library element for that matter)?
As I understand, wall coordinates (begC , endC). are only available in the C++API. You would also need the relative north pointer angle. There are relative straight forward structures in the API to obtain this info there.
You could then transfer the coordinates for each wall to a Python script via the ExecuteAddOnCommand. Complete the calculations within the script and write the results (direction) to a custom property assigned to each wall. An expression is not capable of doing this. This would be a relative short application for a person knowable with The API or the Python API.
BTW: about a year ago, a wish was accepted to allow expressions to run Python scripts. That would solve your problem. We're still waiting?? However, allowing Python scripts to run with every update would be problematic (IMNSHO).
It can be done with property objects that can be auto-attached to elements and than scheduled. I have implemented this functionality for my windows’ reports. Unfortunately listings are going to be absolute soon.