AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Area Precision

12 REPLIES 12
Reply
Message 1 of 13
PatrickManson
829 Views, 12 Replies

Area Precision

I have defined map annotation text which shows a Lot number and an area. The data is attached to the polyline, and the Lot number is manually entered in via the properties pallete. The area field comes from the area of the polyline. I am struggling to figure out how to get the area shown to 0 decimal places, and also to add a m² suffix to all of the areas.

 

Can anyone help with this?

 

Cheers, Patrick

12 REPLIES 12
Message 2 of 13

Ok, i have figured out the precision - but can anyone help to add the m² suffix?

 

Thanks.

Message 3 of 13
Murph_Map
in reply to: PatrickManson

If you are using map anno blocks I would use Mtext for M2  (M\u+214A) and right justification for the attribute.

Murph
Supporting the troops daily.
Message 4 of 13

Hi Murph, thanks for the reply. I have defined the template using mapanntext, the first line picks up the Lot number previously defined, and the second line picks up the area of the polyline. I am not sure how to add the area of the polyline as a field to mtext in the block editor as you cannot select the polyline to link it to using that method. I cannot add the m² to the end of that as mtext as it is not linked to the size of the area, so if you have a large area it is over the top of the m².

 

My mapanntext is (rtos .area), how can i add that as a field into a mtext?

 

Thanks, Patrick

Message 5 of 13

I have finally figured this out. This is expression value in the mapanntext dialog

 

(strcat (RTOS .AREA 2 0) "m²")

 

Thanks for your help everyone.

 

Patrick

Message 6 of 13
Murph_Map
in reply to: PatrickManson


@PatrickManson wrote:

I have finally figured this out. This is expression value in the mapanntext dialog

 

(strcat (RTOS .AREA 2 0) "m²")

 

Thanks for your help everyone.

 

Patrick


I tried that way as well but couldn't get the 2  on the M2 to half size. 🙂

As for the scale of the mtext uae the same size as the attributte then when you insert use scale option and scale based on the area.

 

Murph
Supporting the troops daily.
Message 7 of 13
antoniovinci
in reply to: Murph_Map


Murph wrote:
I tried that way as well but couldn't get the 2  on the M2 to half size 

Here you have the right Unicode syntax, my dear:

(strcat (RTOS .AREA 2 0) "m\U+00B2")

Message 8 of 13
Murph_Map
in reply to: antoniovinci


@antoniovinci wrote:

@Anonymous wrote:
I tried that way as well but couldn't get the 2  on the M2 to half size 

Here you have the right Unicode syntax, my dear:

(strcat (RTOS .AREA 2 0) "m\U+00B2")


Thanks sweety.

Murph
Supporting the troops daily.
Message 9 of 13
antoniovinci
in reply to: Murph_Map

For the newbies, the full list of Unicode codes is available by means of:

WIN-R => CHARMAP

 

Message 10 of 13

Hey,

 

I'm working with your formula, I need to use 2 decimal instead of "no decimals". So what does the 2 0 stand for? 

 

(RTOS .AREA 2 0)

 

I tried typping (RTOS .AREA 2 2) for 2 decimals, but it didn't work, can you tell me the correcto formula?

 

Thanks

Message 11 of 13

Hi Sorry, i cannot even remember where you enter that formula in! i have played around with my template, but cannot see where to do that anymore - if you can help with where you enter the formula i will see what i can do.

 

cheers

Message 12 of 13
paul.eyden
in reply to: PatrickManson

Hi,

 

I have also been working on this and successfully edited the formula to produce 3 decimal places.

 

(strcat (RTOS .AREA 2 3) "m²")

 

See screen shots.

 

Hope this helps.

 

Paul

Message 13 of 13

Hi,

 

Your formula is correct (rtos .AREA 2 2)

but you should be careful with DIMZIN variable because RTOS (lisp conversion function) read DIMZIN value to remove (or not) 0 value at the end.

By default DIMZIN is set to 8, so if you have a real value 12.5 and use (rtos 12.5 2 3) you obtain  "12.5".

If you want to obtain "12.500" you should set DIMZIN to 0, then rtos convert with good number of decimal even with 0 value.

 

Olivier

Olivier Eckmann

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost