Can I some way format a float value that is a part of a label

Hi

I try to make labels from Geometry_Area property in Thematic mapping. That works OK but I like to round of the values th just square meters  --and not with 6 decimals as they are now

Thanks

Erik

Parents Reply Children
  • Hi Jeff

    You just pointed out the root of the problem: Regional setting!

    If I change that from Danish to English the Round function works just as expected!

    But that does not help me much!

    I can't change the Regional settings on all our computers because they also run other software that relay on proper Language and regional setting.

    Most technical software runs only decimal point and do not care about regional settings for decimal seperation sign.

    And in  VBA it a mix (or a mash): Format function do use the regional setting but function Val do not -so one have to always replace "," with "." after formating.

    So what would be the best solution?

    Since Geometry_Area allways is created with "." a configuration setting or variable telling PowerMap that is should ignore the regional setting ?

    Thanks

    Erik

  • Erik,

    Are you using Bentley PowerMap V8i (SELECTseries 1) and if so what specific version? Using "Dutch (Netherlands)" regional settings with a recent Bentley Map V8i (SELECTseries 1) 08.11.07 build on the MicroStation V8i (SELECTseries 2) 08.11.07 platform, the originally suggested [System.Math.Round([Geometry_Area],2)] label text string expression seems to work as expected in my local testing as shown in the following:

    We will continue to investigate this issue, but you may be able to solve your immediate needs by using following expression... 

    [System.String.SubString("[Geometry_Area]",0,(System.String.Length("[Geometry_Area]")-System.String.IndexOf("[Geometry_Area]", ".")-1))]

    ...which simply performs a substring extract, but not true numeric rounding.

    Regards,

    Jeff Bielefeld [Bentley]