We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-11-12 03:06 AM - edited 2021-11-12 03:32 AM
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)?
2021-11-12 03:41 AM
I have achieved this in Windows and doors and wall accessory but never tried with properties. I doubt it can be done
2021-11-12 04:00 AM
I see the curtain wall panel has a property parameter for 'Angle from north'.
But I see nothing for walls or any other element to do with orientation from north or project origin.
So I don't think it can be done in property expressions.
Barry.
2021-11-12 06:09 AM
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).
2021-11-12 08:11 PM
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.
2021-11-15 02:14 AM
Just to clarify, What Miha means by Property Objects is as in GDL Property Objects that can be associated with elements and used in the old List Schemes.
Not Properties and Classifications.
The old list schemes do still work (but not with new elements) and have not been updated in many years.
Barry.