Project data & BIM
About BIM-based management of attributes, schedules, templates, favorites, hotlinks, projects in general, quality assurance, etc.

Roof slope label

Not applicable
I created a roof slope label with autotext using:
CONCAT ( STR ( TAN ( PITCH ) * 12, 0 ), "/12 - PITCH" )
which works except that for a low slope roof it will not show the fraction, IE 1/2"/12" is shown as 0"/12"
Peter Baksa

This looks like a property expression, which is not GDL, but I guess it is rounding down to 0. I don't know if a property expression can be used to format a number as a dimension, probably not.

In GDL you can use STR{2} to format numbers as dimensions. REQUEST ("Linear_dimension" ...) can be used to get the format string that the user set in the work environment.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
If you assign the roof pitch using Autotext (#Pitch) in a label does it not display in your required units?
I'm in metric so it may be a regional unit problem.
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Peter Baksa
I played around with it and got a solution.
There is an STRCALCUNIT function that formats a length with the work environment calculation units.
The result of TAN has to be converted from a number to a length: 1 ft * TAN( {Property:Roof/Pitch} )
STRCALCUNIT ( 1 ft * TAN ( {Property:Roof/Pitch} ) ) will give the number you need.

CONCAT ( STRCALCUNIT ( 1 ft * TAN ( {Property:Roof/Pitch} ) ); "/12\"" ) is the concatenated expression, \" is needed to write an " inside a string. It renders a different character on the UI, but works.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

This is giving me a Syntax Error. When I jump to the last  valid character, it's right after CONCAT



ArchiCAD 24, 25 & 26 US
WINDOWS PC, 16GB RAM, Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz 3.40 GHZ, NVIDIA GEForce GTX 970, ASUS, CM6870, Rev X.0x

I'm having similar syntax error as reidweber.   Hoping to open the thread again to find a solution.  Rather than /12 I would like to put /1'-0" at the end of the expression.  Would that be .... /1\'\-\0\"") 

ArchiCAD v27 (since v11)
MacBook Pro M1 Max, 64GB
macOS Sonoma

Start a new conversation!

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!