cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
JKL
Booster

Expression Editor Help-Decimal Expression

I've got my properties set up for a company roof tag. The elements work perfect UNTIL I try to delete the decimals from the string conversion, it thinks I want to multiple by 0 and so all of my slopes are coming out 0:12. can someone please help me figure out what is wrong here? I've also changed it to a ; with same errors. 

the code that works is 

 

CONCAT (STR (TAN (PITCH) * 12), '':12''" 

 

I should just be able to add (PITCH, 0) so that there are zero decimal points, but when I do that it tells me there are an unexpected number of expressions. 

Please help! 

 

Screenshot 2026-03-05 at 4.46.43 PM.png

 

Screenshot 2026-03-05 at 4.46.53 PM.png

 

Operating system used: Mac Apple Silicon

  

Designer

Mac

Archicad 29
Setup info provided by author
1 Solution

Accepted Solutions
Laszlo Nagy
Community Admin
Community Admin

This Expression of yours

 

CONCAT (STR (TAN (PITCH) * 12), '':12''"

 

is incorrect because

1. After the comma (,) you have two single quotes,

2. At the end, there are three quotes: two single quotes and then a double quote.

So, the text :12 is surrounded by two single quotes on both sides instead of a double quote.

You should have only 1 single quote, then 1 double quote, and it should have a closing parethesis (like on the screenshot).

Something like this:

 

CONCAT ( STR ( TAN ( Pitch ) * 12 ), ":12'" )

 

Or, if you want to specify deciman places:

 

CONCAT ( STR ( TAN ( Pitch ) * 12, 4 ), ":12'" )
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac29

Go to post

4 Replies 4
Laszlo Nagy
Community Admin
Community Admin

This Expression of yours

 

CONCAT (STR (TAN (PITCH) * 12), '':12''"

 

is incorrect because

1. After the comma (,) you have two single quotes,

2. At the end, there are three quotes: two single quotes and then a double quote.

So, the text :12 is surrounded by two single quotes on both sides instead of a double quote.

You should have only 1 single quote, then 1 double quote, and it should have a closing parethesis (like on the screenshot).

Something like this:

 

CONCAT ( STR ( TAN ( Pitch ) * 12 ), ":12'" )

 

Or, if you want to specify deciman places:

 

CONCAT ( STR ( TAN ( Pitch ) * 12, 4 ), ":12'" )
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac29
JKL
Booster

Thank you Laszlo, those are actually there on purpose and not effecting the expression-it is double ' to show " in the tag I am creating. So it is ' ' ". This is built into all of my expressions and this is the only one that is having trouble. It is when adding in the decimal placement. It looks like from your example above, I need to add it after the multiplication. I'll try that and see if it works! 

 

Thank you! 

Designer

Mac

Archicad 29
JKL
Booster

Yes! That was exactly it. I didn't realize that decimal indicator would go after the expression! Beautiful!

 

Here is also the link for a wonderful video explaining how to get roof tags to show % or ratio! 

 

https://www.youtube.com/watch?v=bWuSW_rt6GM&t=2258s

 

Screenshot 2026-03-06 at 8.15.37 AM.png

Designer

Mac

Archicad 29
Laszlo Nagy
Community Admin
Community Admin

If you want to write a

"

(double quote) character with a Property Expression, you can place a backslash in front of it like this:

\"

and then Archicad will know that it is not the start or end of a string, but a literal double quote character.

So, if you use the following for your Expression:

 

CONCAT ( STR ( TAN ( Pitch ) * 12, 0 ), "\":12\"" )

 

you will get the desired result. For example:

4":12"

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac29

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!