cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anatatj
Contributor

Label as level dimension in plan

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:

Screenshot_1.jpg

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


Screenshot_1.jpg
1 Solution

Accepted Solutions
Barry Kelly
Moderator

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.

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

Go to post

4 Replies 4
Barry Kelly
Moderator

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.

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
Anatatj
Contributor

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.

Barry Kelly
Moderator

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.

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
Anatatj
Contributor

Thank you! That's working!

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!