We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-05-22 09:38 AM - last edited on 2024-05-25 02:03 PM by Laszlo Nagy
Hello, I'm trying to make a custom label that will show me the top elevation of an element, in my case, a wall, so I can use it as a level dimension in the plan.
I made a new expression, then use autotext, than save as lable:
CONCAT ( STRCALCUNIT ( Top Elevation To Project Zero); "="; STRCALCUNIT ( Top Elevation To Sea Level); " " )
This is what i end up with:
How do i change units from cm to m? I want this to be shown as -0,55=21,45
But if i devide by 100 i get -1/21, so its probably problem with decimal number display. any idea? thank you!
Operating system used: Windows
Solved! Go to Solution.
2024-05-27 08:47 AM
Sorry, I made a slight error in the expression - I forgot the divide (/) in the first string.
Dividing the length by cm or m or mm with convert the length to a number.
It might also be / 1 cm instead of / 100 cm as I have shown.
Basically you need to negate the units you are measuring you heights with.
Barry.
2024-05-22 10:41 AM - edited 2024-05-27 08:40 AM
Try something like ... CONCAT ( STR ( Top Elevation To Project Zero / 100 cm; 3); "="; STR ( Top Elevation To Sea Level / 100 cm; 3); " " )
STRCALCUNIT uses the units and precision set in Project preferences Calculation units.
STR lets you set the number of decimals.
So your height is in metres, divide it by 100 cm to get as a number and convert that to a STR with 2 or 3 decimal places.
Seems there is a language thing were you use a semi colon ; as separators in the expression, but I have to use a comma ,
Barry.
2024-05-27 08:38 AM
For some reason function SRT does not accept value as lenght. Value can be only Integer, Number or True/False. Top Elevation To Project Zero and Top Elevation To Sea Level are lenghts, so i get: Argument’s Data Type is Not Correct. This argument expects a Non-Unit value.
2024-05-27 08:47 AM
Sorry, I made a slight error in the expression - I forgot the divide (/) in the first string.
Dividing the length by cm or m or mm with convert the length to a number.
It might also be / 1 cm instead of / 100 cm as I have shown.
Basically you need to negate the units you are measuring you heights with.
Barry.
2024-05-27 09:06 AM
Thank you! That's working!