We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Convert degrees to percent

_Salmon
Booster
Hi,
i'm trying to convert from degrees to percent using this formula: "percent = tan (angle) x 100"
why doesn`t work?
thanks
Since AC6

Win10pro / Intel Xeon E5-1650v4 / 128Gb DDR4 2400 MHz ECC REG / NVIDIA GeForce GTX 1080 / SSD Toshiba 512GB M.2
8 REPLIES 8
Barry Kelly
Moderator
If 0° = 0% and 90° = 100%, then isn't it just a straight relationship - nothing to do with TAN?

(angle * 100) / 90 should give you the %

i.e. (45° * 100) / 90 = 50


Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
runxel
Legend
Barry wrote:
If 0° = 0% and 90° = 100%, then isn't it just a straight relationship - nothing to do with TAN?
That is a common misconception, but in reality of course 100% inclination equals 45°.
(It's easier to remember, if you know, what x% inclination even means: after 100 meters going "flat", how many meters did the slope go up? (= imagine a right-angled triangle) If the answer is "100", then this triangle obviously has 45° angle)

So, if all you got is the angle, then the inclination in percent is indeed the TAN of the angle * 100.

What's not working on the other side is the additional "STRCALUNIT".
Just use
"TAN ( {the Property of incl.} ) * 100"
and you're good to go.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
_Salmon
Booster
thanks for your help!
But which expression i have to use to publish the % result in a string?
The error is still there
Since AC6

Win10pro / Intel Xeon E5-1650v4 / 128Gb DDR4 2400 MHz ECC REG / NVIDIA GeForce GTX 1080 / SSD Toshiba 512GB M.2
_Salmon
Booster
Ok. Solved!
So now i'm trying to quit those decimals in the pipe diameter.
Any idea?
Since AC6

Win10pro / Intel Xeon E5-1650v4 / 128Gb DDR4 2400 MHz ECC REG / NVIDIA GeForce GTX 1080 / SSD Toshiba 512GB M.2
runxel
Legend
USe SPLITLEFT and with the comma as the text where to split.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Barry Kelly
Moderator
runxel wrote:
Barry wrote:
If 0° = 0% and 90° = 100%, then isn't it just a straight relationship - nothing to do with TAN?
That is a common misconception, but in reality of course 100% inclination equals 45°.
(It's easier to remember, if you know, what x% inclination even means: after 100 meters going "flat", how many meters did the slope go up? (= imagine a right-angled triangle) If the answer is "100", then this triangle obviously has 45° angle)

So, if all you got is the angle, then the inclination in percent is indeed the TAN of the angle * 100.

Thanks runxel.
You can tell I don't use % for slopes.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
_Salmon
Booster
Done! Thanks Runxel

I started using archicad 21 years ago thanks to people like you.

I hope graphisoft takes into account the importance of the help service we need in the forum
Since AC6

Win10pro / Intel Xeon E5-1650v4 / 128Gb DDR4 2400 MHz ECC REG / NVIDIA GeForce GTX 1080 / SSD Toshiba 512GB M.2
TJ Admin
Booster

If you are still looking? This is the correct string Formula. Meant to label Roof 'Pitch' "Auto Text":

CONCAT ( STR ( TAN ( {Property:Roof/Pitch} ) * 100; 2 ); "%" )