<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Can I some way format a float value that is a part of a label</title><link>https://communities.bentley.com/products/geospatial/desktop/f/bentley-map-forum/62016/can-i-some-way-format-a-float-value-that-is-a-part-of-a-label</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Re: Can I some way format a float value that is a part of a label</title><link>https://communities.bentley.com/thread/151667?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2010 21:23:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8e167838-6240-4b56-a9f8-a090397622fd</guid><dc:creator>Jeff Bielefeld</dc:creator><description>&lt;p&gt;Erik,&lt;/p&gt;
&lt;p&gt;Are you using Bentley PowerMap V8&lt;em&gt;i&lt;/em&gt; (SELECTseries 1) and if so what specific version? Using &amp;quot;Dutch (Netherlands)&amp;quot; regional settings with a recent Bentley Map V8&lt;em&gt;i&lt;/em&gt; (SELECTseries 1) 08.11.07 build on the MicroStation V8&lt;em&gt;i&lt;/em&gt; (SELECTseries 2) 08.11.07 platform, the originally suggested &lt;strong&gt;[System.Math.Round([Geometry_Area],2)]&lt;/strong&gt; label text string expression seems to work as expected in my local testing as shown in the following:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;img src="http://communities.bentley.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Discussions-Components-Files/5924/2364.image_5F00_08-2010.11.24-10.15.02.gif" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We will continue to investigate this&amp;nbsp;issue, but you may be able to&amp;nbsp;solve your immediate needs by using following expression...&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;[System.String.SubString(&amp;quot;[Geometry_Area]&amp;quot;,0,(System.String.Length(&amp;quot;[Geometry_Area]&amp;quot;)-System.String.IndexOf(&amp;quot;[Geometry_Area]&amp;quot;, &amp;quot;.&amp;quot;)-1))]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;...which simply performs a substring extract, but not true numeric&amp;nbsp;rounding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Can I some way format a float value that is a part of a label</title><link>https://communities.bentley.com/thread/151627?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2010 13:47:53 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5158ff4b-1ecc-4c55-ba30-138d0249c41e</guid><dc:creator>wirring</dc:creator><description>&lt;p&gt;Hi Jeff&lt;/p&gt;
&lt;p&gt;You just pointed out the root of the problem: Regional setting!&lt;/p&gt;
&lt;p&gt;If I change that from Danish to English the Round function works just as expected!&lt;/p&gt;
&lt;p&gt;But that does not help me much! &lt;/p&gt;
&lt;p&gt;I can&amp;#39;t change the Regional settings on all our computers because they also run other software that relay on proper Language and regional setting.&lt;/p&gt;
&lt;p&gt;Most technical software runs only decimal point and do not care about regional settings for decimal seperation sign.&lt;/p&gt;
&lt;p&gt;And in &amp;nbsp;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 &amp;quot;,&amp;quot; with &amp;quot;.&amp;quot; after formating.&lt;/p&gt;
&lt;p&gt;So what would be the best solution?&lt;/p&gt;
&lt;p&gt;Since Geometry_Area allways is created with &amp;quot;.&amp;quot; a configuration setting or variable telling PowerMap that is should ignore the regional setting ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Can I some way format a float value that is a part of a label</title><link>https://communities.bentley.com/thread/151605?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2010 22:52:22 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4557c8c1-4e27-412d-8e28-c267a148c0da</guid><dc:creator>Jeff Bielefeld</dc:creator><description>&lt;p&gt;...what product (e.g. Bentley Map, Bentley PowerMap etc...) and version are you using? Could you please send me directly a copy of a design file containing some instance data which is producing this result? Also include details on what language and regional settings are being used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Can I some way format a float value that is a part of a label</title><link>https://communities.bentley.com/thread/151592?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2010 20:42:09 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:13f369a5-be7c-408d-aa94-a2667f044fec</guid><dc:creator>wirring</dc:creator><description>&lt;p&gt;Hi Jeff&lt;/p&gt;
&lt;p&gt;Sorry to say, but when I enter [System.Math.Round([Geometry_Area],2)] I get the area multiplied with one million.&lt;/p&gt;
&lt;p&gt;So instead of 777.476031 I get 777476031 and it makes no difference if I ask for any other number of digits :-(&lt;/p&gt;
&lt;p&gt;So what goes wrong&lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Can I some way format a float value that is a part of a label</title><link>https://communities.bentley.com/thread/151582?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2010 19:37:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:dde6234b-99e5-48bd-910e-4dfcfb81f28a</guid><dc:creator>Jeff Bielefeld</dc:creator><description>&lt;p&gt;Erik,&lt;/p&gt;
&lt;p&gt;For your label text string, you should be able to use the &lt;strong&gt;[System.Math.Round([Geometry_Area],2)]&lt;/strong&gt; expression as shown in the following...&lt;/p&gt;
&lt;p&gt;&lt;img src="http://communities.bentley.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Discussions-Components-Files/5924/1817.image_5F00_02-2010.11.23-08.36.25.gif" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;...to perform the desired rounding, where n in [System.Math.Round([Geometry_Area],n)] indicates the number of digits after the decimal that are desired.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>