cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Document & Visualize forum

Expression cannot be evaluated - Property Manger

tjmillar
Booster

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?

AC25 Australia, Windows 10
1 ACCEPTED SOLUTION

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 10 - Visual Studio 2019; ArchiCAD 26

View solution in original post

12 REPLIES 12

poco2013
Advisor

Most likely, you have not classified it properly

Gerry



Windows 10 - Visual Studio 2019; ArchiCAD 26

It is classified as an opening. I have experimented with various classifications, and when it is classified incorrectly the error message says that the parameter is not available for that classification, not that it cannot be evaluated. 

AC25 Australia, Windows 10

If your using the evaluate function, perhaps you have the wall selected rather than the opening

Gerry



Windows 10 - Visual Studio 2019; ArchiCAD 26

The opening is selected. You cannot evaluate the expression otherwise. If you select the wall, the classification is wrong and you get a "Property is not available for this Element's Classification" error.

AC25 Australia, Windows 10

If you have classified the expression for "all elements" or for both "walls" and "empty openings" you will get that message. The opening expression should be classified as "empty opening" only Then select the opening

Gerry



Windows 10 - Visual Studio 2019; ArchiCAD 26

Rajesh Patil
Advocate

If you are applying "Opening" elements parameter to "Empty Door" parameter it wont work as these are two different elements.

2022-04-09.png

Rajesh Patil
AC 09-25 | INT | WIN11 64
Dell Inspiron 7591, Core i9, 9880H 2.30GHz, 16.0GB, NVidia GeForce GTX1650, 4.0GB, SSD Internal 500GB, Dell SSD External 250GB

tjmillar
Booster

Thank you Rajesh, that is the issue. I was using Rectangular Door Opening 25, and applying a parameter from the Opening group. Changing the classification to Opening or Empty Opening (or anything else) doesn't fix that issue. If I create an Opening with the Opening tool instead of an empty opening with the door tool the property works. 

So how do I create a label that returns the figure I can see in the Info Box? (Header to Wall top) There are no parameters in the Window/Door group that relate to the wall height, but again, it is a simple option to display that figure in the info box. I just need to be able to put that figure into a label. 

I could use the opening tool instead of the rectangular door opening, but it's not as versatile and I would prefer not to have to resort to that. 

 

AC25 Australia, Windows 10

Yves
Booster

Hi,
With two formulas, one for doors and one for openings

Capture d’écran 2022-04-10 à 09.06.24.png

Capture d’écran 2022-04-10 à 09.13.21.png

Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13

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.

 

 

actively using: AC22-25 INT | Rhino6-7 | macOS / win10

tjmillar
Booster

Thanks for your response Yves. I'm sorry but I can't see how that helps. If I use an opening rather than an empty door there is no problem, I can apply the parameter I need (header to wall top - though will need to convert if from a negative to a positive figure for the label). But I want that figure for an empty door, and unlike the list of parameters for openings, there are no parameters for doors and windows that relate to the height of the wall. 

AC25 Australia, Windows 10

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 10 - Visual Studio 2019; ArchiCAD 26

tjmillar
Booster

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 🙂

AC25 Australia, Windows 10

Start a new conversation!

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!