Annotation value rounding

Annotation value rounding

Gary_Braun
Collaborator Collaborator
1,713 Views
10 Replies
Message 1 of 11

Annotation value rounding

Gary_Braun
Collaborator
Collaborator

Annotation templates have been around for ages, and I've seldom used them but am trying to now. I created the block and have it using .LENGTH to label a bunch of line lengths. I don't need all of these to 10 decimal places though, how do I round the values when the block is inserted?

 

Thanks,

Gary

0 Likes
Accepted solutions (1)
1,714 Views
10 Replies
Replies (10)
Message 2 of 11

fieldguy
Advisor
Advisor

search help for "realtostring".

0 Likes
Message 3 of 11

fieldguy
Advisor
Advisor

bad answer - wrong forum again. here's the definition of a "field" in vanilla acad. "pr2" = precision 2

%<\AcObjProp Object(%<\_ObjId 2383072587280>%).Length \f "%lu2%pr2">%

 

0 Likes
Message 4 of 11

O_Eckmann
Mentor
Mentor
Accepted solution

Hi,

 

you can use LISP expression

(rtos .LENGTH 2 1)

Number of decimal is managed by the last parameter (1 decimal in my example)

 

Olivier

Olivier Eckmann

EESignature

Message 5 of 11

Gary_Braun
Collaborator
Collaborator

I probably should have guessed that. Works great, thanks Oliver.

0 Likes
Message 6 of 11

NoelN.
Contributor
Contributor

I'm having the same issue but for that expression where do you put that lisp in the annotation template.

0 Likes
Message 7 of 11

Pointdump
Consultant
Consultant

Hi Noel,
Good question. I tried just now looking at Attribute Property in the Block Editor, but couldn't find any way to change precision.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
Message 8 of 11

Pointdump
Consultant
Consultant

Noel,
OK, I found it. From >>>This Post<<< @olivier.eckmann shows how >>>Here<<<.

I'm going to try it right now.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 9 of 11

Pointdump
Consultant
Consultant

Still trying to decipher Olivier's video. I've watched it 4 times already. He moves fast and everything is in French. (Those French have a different word for EVERYTHING!) 😄

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 10 of 11

Pointdump
Consultant
Consultant

Olivier,
You rock! Works great!
Dave

 

Precision_2.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 11 of 11

NoelN.
Contributor
Contributor

okay thank you!

0 Likes