Documentation
About Archicad's documenting tools, views, model filtering, layouts, publishing, etc.
SOLVED!

Expression cannot be evaluated - Property Manger

tjmillar
Enthusiast

I want to label an empty opening with the Header to Wall Top dimension. That figure is available in the info box under Sill or Header Height, but not as a figure I can use in a label. 

In Property Manager, when I try to create a property to display this figure so that I can use it in a label, I use Data Type "Length", select "Expression", and add the "Header Height to Wall Top" parameter from the "Opening" group. When I click Evaluate, I get "Expression cannot be evaluated for this element". Even though Archicad does evaluate this figure in the info box. 

Any suggestions as to what I'm doing wrong?

AC26 Australia, Windows 10
12 REPLIES 12

Better documentation would be useful for the property manager, a lot of hit or miss could be avoided... I've run into a very similar issue, where I thought that using nested if statements are the way to go to use different parameters based on different element types... It was running me crazy, that although each branch evaluated just fine in separate properties tested for each element type, the if statement itself gave the "not evaluable expression" error, as one branch in the logical tree wasn't applicable. Imagine a very simple example: IF (Element Type = "Object"; "do this"; "otherwise do that"), this just won't run if you are using e.g. Length(A) for the true path...

 

The solution was to add multiple expressions, but that way it's harder to control the value assignment, imo.

 

 

odv.hu | actively using: AC25-27 INT | Rhino6-8 | macOS @ apple silicon / win10 x64
Solution

The primary problem , as you have stated, is that empty door openings do not have a property of "height above to top of wall" This would be a simple calculation except it involves two difference elements -- So a expression can not be used.

The solution is to use a Python script to make the calculation and insert the result into a property classified for the door opening.

 

To do that one would need to be able to determine the wall that the door is in to get the wall height. Again -- that is not native to Python scripts (at this time) .

 

However, I have created a AddOn which uses the Python CommandHandler function and adds that capability to Python scripts -- data_access.apx

 

Made a video which explains the process

Lintel space calculation 

The AddOn and the Python script are posted on my GitHub site listed in the video comments.

If you have any questions - just leave them below

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
tjmillar
Enthusiast

Thanks so much Gerry, that video is very helpful, greatly appreciate the time you've taken to go into such a detailed explanation. I have been interested in learning more about Python for a while, seems like this will be an excellent first step in that direction!

I'm not sure that applying that script is going to be the best solution in the circumstances - anything that requires extra steps is going to end up being missed by the production drafting team sooner or later. The point of the process was to make a label that worked without any other input. Clearly that's not going to be possible. 

The solution is going to be simply to impose the use of a conventional height x width of the opening notation, instead of the company's historical preference for lintel to ceiling height (which has always been a manual input previously). 

One of my team members did show me another workaround which relates to my question about to access the figure in the Info Box for Header to Wall Top: it can be added as an autotext input in a Text Label. The window/door parameter W/D Nominal Head Height will return the header to wall top figure if that is what is set in info box. The problem here is that also anchors the opening to the header height, so when the opening size is changed the sill moves, not the header. When the sill is set to Project 0 or wall bottom to anchor the opening correctly, the autotext label will change to display the opening height, not the header to wall top distance. Again it's not an adequate solution in my circumstances, since the whole point of the exercise was to find an automatic solution that would always return the correct figure even when the production draftee forgets to check that the dimension is set correctly. 

I am however looking forward to experimenting further with the Python script! Thanks again 🙂

AC26 Australia, Windows 10