Author Topic: Formula in field to show values rounded up  (Read 723 times)

0 Members and 1 Guest are viewing this topic.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Formula in field to show values rounded up
« on: May 25, 2023, 11:53:25 AM »

Code: [Select]
I have a field in attrib linked with a parameter of a dynamic block, the parameter can be 0.01 to 2000:

%<\AcObjProp.16.2 Object(?BlockRefId).Parameter(8).UpdatedDistance \f "%lu6%zs8">%

How can I get this kind of result based on parameter value?

from 0.01 to 1000 > 1000
>     1000 to 1500 > 1500
from 1500 to 2000 > 2000

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Formula in field to show values rounded up
« Reply #1 on: May 26, 2023, 01:06:49 AM »
Can you extract "measurement" parameter from UpdatedDistance with vla-get-measurement...
If your answer is yes, then simply (cond) would do rounding up like you described...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: Formula in field to show values rounded up
« Reply #2 on: May 26, 2023, 06:39:13 AM »
Can you extract "measurement" parameter from UpdatedDistance with vla-get-measurement...
If your answer is yes, then simply (cond) would do rounding up like you described...
Thanks Marko, I will take a look.