<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Specific rounding question in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356285#M71534</link>
    <description>I am measuring room sizes and I have been instructed to only use X'-0" X'-4"&lt;BR /&gt;
X'-6" or X'-8"&lt;BR /&gt;
&lt;BR /&gt;
How would I search my string value for any inches and then round to one of&lt;BR /&gt;
those inch values.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Here is some sample code:&lt;BR /&gt;
Dim pt1 As Variant&lt;BR /&gt;
Dim pt2 As Variant&lt;BR /&gt;
pt1 = ThisDrawing.Utility.GetPoint(, "Pick Lower Left Corner of Room...")&lt;BR /&gt;
pt2 = ThisDrawing.Utility.GetPoint(, "Pick Upper Right Corner of Room...")&lt;BR /&gt;
&lt;BR /&gt;
Dim line1 As AcadLine&lt;BR /&gt;
Set line1 = ThisDrawing.ModelSpace.AddLine(pt1, pt2)&lt;BR /&gt;
&lt;BR /&gt;
Dim valueAsStrX As String&lt;BR /&gt;
Dim valueAsStrY As String&lt;BR /&gt;
Dim unit As Long&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim lineDelta As Variant&lt;BR /&gt;
lineDelta = line1.Delta&lt;BR /&gt;
Dim deltaX As Variant&lt;BR /&gt;
Dim deltaY As Variant&lt;BR /&gt;
&lt;BR /&gt;
deltaX = lineDelta(0)&lt;BR /&gt;
deltaY = lineDelta(1)&lt;BR /&gt;
&lt;BR /&gt;
line1.Delete&lt;BR /&gt;
unit = acArchitectural&lt;BR /&gt;
&lt;BR /&gt;
    valueAsStrX = ThisDrawing.Utility.RealToString(deltaX, unit, 0)&lt;BR /&gt;
    valueAsStrY = ThisDrawing.Utility.RealToString(deltaY, unit, 0)&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
    <pubDate>Mon, 19 Aug 2002 05:55:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-08-19T05:55:01Z</dc:date>
    <item>
      <title>Specific rounding question</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356285#M71534</link>
      <description>I am measuring room sizes and I have been instructed to only use X'-0" X'-4"&lt;BR /&gt;
X'-6" or X'-8"&lt;BR /&gt;
&lt;BR /&gt;
How would I search my string value for any inches and then round to one of&lt;BR /&gt;
those inch values.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Here is some sample code:&lt;BR /&gt;
Dim pt1 As Variant&lt;BR /&gt;
Dim pt2 As Variant&lt;BR /&gt;
pt1 = ThisDrawing.Utility.GetPoint(, "Pick Lower Left Corner of Room...")&lt;BR /&gt;
pt2 = ThisDrawing.Utility.GetPoint(, "Pick Upper Right Corner of Room...")&lt;BR /&gt;
&lt;BR /&gt;
Dim line1 As AcadLine&lt;BR /&gt;
Set line1 = ThisDrawing.ModelSpace.AddLine(pt1, pt2)&lt;BR /&gt;
&lt;BR /&gt;
Dim valueAsStrX As String&lt;BR /&gt;
Dim valueAsStrY As String&lt;BR /&gt;
Dim unit As Long&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim lineDelta As Variant&lt;BR /&gt;
lineDelta = line1.Delta&lt;BR /&gt;
Dim deltaX As Variant&lt;BR /&gt;
Dim deltaY As Variant&lt;BR /&gt;
&lt;BR /&gt;
deltaX = lineDelta(0)&lt;BR /&gt;
deltaY = lineDelta(1)&lt;BR /&gt;
&lt;BR /&gt;
line1.Delete&lt;BR /&gt;
unit = acArchitectural&lt;BR /&gt;
&lt;BR /&gt;
    valueAsStrX = ThisDrawing.Utility.RealToString(deltaX, unit, 0)&lt;BR /&gt;
    valueAsStrY = ThisDrawing.Utility.RealToString(deltaY, unit, 0)&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 19 Aug 2002 05:55:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356285#M71534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T05:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Specific rounding question</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356286#M71535</link>
      <description>It sounds like you need to do more than just round.&lt;BR /&gt;
Of course first step is isolate your inch value,&lt;BR /&gt;
then if it's &amp;lt; 4 set = 4&lt;BR /&gt;
if &amp;gt;4 and &amp;lt;6 set = 6&lt;BR /&gt;
if &amp;gt;6 and &amp;lt;8 set = 8&lt;BR /&gt;
if &amp;gt;8 ??? here, are you going to round up to the next foot?&lt;BR /&gt;
or &amp;gt;8 and &amp;lt;10 set = 8...and &amp;gt; 10 round to next foot, in which case you need&lt;BR /&gt;
to get your foot string value and increment that too.&lt;BR /&gt;
&lt;BR /&gt;
"Eric Stewart" &lt;MOC.CN-HCH&gt; wrote in message&lt;BR /&gt;
news:BB81211EB622ADA09AFD760976D0BEE2@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I am measuring room sizes and I have been instructed to only use X'-0"&lt;BR /&gt;
X'-4"&lt;BR /&gt;
&amp;gt; X'-6" or X'-8"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; How would I search my string value for any inches and then round to one of&lt;BR /&gt;
&amp;gt; those inch values.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Here is some sample code:&lt;BR /&gt;
&amp;gt; Dim pt1 As Variant&lt;BR /&gt;
&amp;gt; Dim pt2 As Variant&lt;BR /&gt;
&amp;gt; pt1 = ThisDrawing.Utility.GetPoint(, "Pick Lower Left Corner of Room...")&lt;BR /&gt;
&amp;gt; pt2 = ThisDrawing.Utility.GetPoint(, "Pick Upper Right Corner of Room...")&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Dim line1 As AcadLine&lt;BR /&gt;
&amp;gt; Set line1 = ThisDrawing.ModelSpace.AddLine(pt1, pt2)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Dim valueAsStrX As String&lt;BR /&gt;
&amp;gt; Dim valueAsStrY As String&lt;BR /&gt;
&amp;gt; Dim unit As Long&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Dim lineDelta As Variant&lt;BR /&gt;
&amp;gt; lineDelta = line1.Delta&lt;BR /&gt;
&amp;gt; Dim deltaX As Variant&lt;BR /&gt;
&amp;gt; Dim deltaY As Variant&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; deltaX = lineDelta(0)&lt;BR /&gt;
&amp;gt; deltaY = lineDelta(1)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; line1.Delete&lt;BR /&gt;
&amp;gt; unit = acArchitectural&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     valueAsStrX = ThisDrawing.Utility.RealToString(deltaX, unit, 0)&lt;BR /&gt;
&amp;gt;     valueAsStrY = ThisDrawing.Utility.RealToString(deltaY, unit, 0)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/MOC.CN-HCH&gt;</description>
      <pubDate>Mon, 19 Aug 2002 07:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356286#M71535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T07:57:32Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356287#M71536</link>
      <description>Oh sure.  The If Then stuff is simple.  How would one go about isolating the&lt;BR /&gt;
lst three characters of the string?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Mark Propst" &lt;MARK&gt; wrote in message&lt;BR /&gt;
news:945C1887B43F3C7230154BC2F83D4485@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; It sounds like you need to do more than just round.&lt;BR /&gt;
&amp;gt; Of course first step is isolate your inch value,&lt;BR /&gt;
&amp;gt; then if it's &amp;lt; 4 set = 4&lt;BR /&gt;
&amp;gt; if &amp;gt;4 and &amp;lt;6 set = 6&lt;BR /&gt;
&amp;gt; if &amp;gt;6 and &amp;lt;8 set = 8&lt;BR /&gt;
&amp;gt; if &amp;gt;8 ??? here, are you going to round up to the next foot?&lt;BR /&gt;
&amp;gt; or &amp;gt;8 and &amp;lt;10 set = 8...and &amp;gt; 10 round to next foot, in which case you&lt;BR /&gt;
need&lt;BR /&gt;
&amp;gt; to get your foot string value and increment that too.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Eric Stewart" &lt;MOC.CN-HCH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:BB81211EB622ADA09AFD760976D0BEE2@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; I am measuring room sizes and I have been instructed to only use X'-0"&lt;BR /&gt;
&amp;gt; X'-4"&lt;BR /&gt;
&amp;gt; &amp;gt; X'-6" or X'-8"&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; How would I search my string value for any inches and then round to one&lt;BR /&gt;
of&lt;BR /&gt;
&amp;gt; &amp;gt; those inch values.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Here is some sample code:&lt;BR /&gt;
&amp;gt; &amp;gt; Dim pt1 As Variant&lt;BR /&gt;
&amp;gt; &amp;gt; Dim pt2 As Variant&lt;BR /&gt;
&amp;gt; &amp;gt; pt1 = ThisDrawing.Utility.GetPoint(, "Pick Lower Left Corner of&lt;BR /&gt;
Room...")&lt;BR /&gt;
&amp;gt; &amp;gt; pt2 = ThisDrawing.Utility.GetPoint(, "Pick Upper Right Corner of&lt;BR /&gt;
Room...")&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Dim line1 As AcadLine&lt;BR /&gt;
&amp;gt; &amp;gt; Set line1 = ThisDrawing.ModelSpace.AddLine(pt1, pt2)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Dim valueAsStrX As String&lt;BR /&gt;
&amp;gt; &amp;gt; Dim valueAsStrY As String&lt;BR /&gt;
&amp;gt; &amp;gt; Dim unit As Long&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Dim lineDelta As Variant&lt;BR /&gt;
&amp;gt; &amp;gt; lineDelta = line1.Delta&lt;BR /&gt;
&amp;gt; &amp;gt; Dim deltaX As Variant&lt;BR /&gt;
&amp;gt; &amp;gt; Dim deltaY As Variant&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; deltaX = lineDelta(0)&lt;BR /&gt;
&amp;gt; &amp;gt; deltaY = lineDelta(1)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; line1.Delete&lt;BR /&gt;
&amp;gt; &amp;gt; unit = acArchitectural&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;     valueAsStrX = ThisDrawing.Utility.RealToString(deltaX, unit, 0)&lt;BR /&gt;
&amp;gt; &amp;gt;     valueAsStrY = ThisDrawing.Utility.RealToString(deltaY, unit, 0)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/MOC.CN-HCH&gt;&lt;/MARK&gt;</description>
      <pubDate>Mon, 19 Aug 2002 10:20:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356287#M71536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T10:20:29Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356288#M71537</link>
      <description>Eric,&lt;BR /&gt;
look at the Left Right and Mid functions as well as Left$, Right$ etc&lt;BR /&gt;
What do the 1st three characters have to do with what you were talking&lt;BR /&gt;
about?&lt;BR /&gt;
You will have to see what form the string you have to start with will have.&lt;BR /&gt;
Where do you get the string from? a dimension text, a distance command, a&lt;BR /&gt;
text entity?  In any case the format may have an \" for the inch mark. you&lt;BR /&gt;
may need to find that using Right for example, then step forward through the&lt;BR /&gt;
string to see if there's a fraction to deal with, then forward again to get&lt;BR /&gt;
the inch value etc.&lt;BR /&gt;
each string may vary depending on what your actual input is.&lt;BR /&gt;
1'-2 13/16", "1'-2 13/16\"", 2'-4", 2' 4", "2' 4\"", etc.&lt;BR /&gt;
I don't think you can count on the number of characters to find your inch&lt;BR /&gt;
value you may have to find the inch mark and it's preceeding space character&lt;BR /&gt;
(or dash) and deal with that.&lt;BR /&gt;
&lt;BR /&gt;
does that make any sense?&lt;BR /&gt;
Mark</description>
      <pubDate>Mon, 19 Aug 2002 11:22:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356288#M71537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T11:22:48Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356289#M71538</link>
      <description>&amp;gt; What do the 1st three characters have to do with what you were talking&lt;BR /&gt;
&amp;gt; about?&lt;BR /&gt;
That was a typo.  I meant to type lat three characters  1st looks a lot like&lt;BR /&gt;
lst.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again for your help</description>
      <pubDate>Mon, 19 Aug 2002 11:31:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356289#M71538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T11:31:28Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356290#M71539</link>
      <description>It may be easier to convert the string representation into a real number&lt;BR /&gt;
with the Utility.DistanceToReal method.  Then you could perform the&lt;BR /&gt;
"rounding" calcs using numbers instead of parsing a string.&lt;BR /&gt;
--&lt;BR /&gt;
Bobby C. Jones&lt;BR /&gt;
www.AcadX.com</description>
      <pubDate>Mon, 19 Aug 2002 11:36:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356290#M71539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T11:36:32Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356291#M71540</link>
      <description>Well, I understand typos - it's monday after all, but still you probably&lt;BR /&gt;
can't depend on the lat three characters being the value you need.  But do&lt;BR /&gt;
you have enough of an idea now of how to proceed or you need more?&lt;BR /&gt;
&lt;BR /&gt;
"Eric Stewart" &lt;MOC.CN-HCH&gt; wrote in message&lt;BR /&gt;
news:E03CC5F9F03AB93ADFA793D86A9D761B@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; What do the 1st three characters have to do with what you were talking&lt;BR /&gt;
&amp;gt; &amp;gt; about?&lt;BR /&gt;
&amp;gt; That was a typo.  I meant to type lat three characters  1st looks a lot&lt;BR /&gt;
like&lt;BR /&gt;
&amp;gt; lst.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks again for your help&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/MOC.CN-HCH&gt;</description>
      <pubDate>Mon, 19 Aug 2002 11:36:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356291#M71540</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T11:36:45Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356292#M71541</link>
      <description>I can't find any info in the help file about Left Mid and Right functions.&lt;BR /&gt;
I understand the principle though if I can find documentation.  I think I've&lt;BR /&gt;
done something similar in JavaScript.</description>
      <pubDate>Mon, 19 Aug 2002 11:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356292#M71541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T11:47:51Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356293#M71542</link>
      <description>That would be ideal if I could use 10" measurements.  However, I have been&lt;BR /&gt;
instructed that WE do not show a room dimension with 10".  This is for some&lt;BR /&gt;
Sales type sheets and 10" is not desired.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 19 Aug 2002 11:50:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356293#M71542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T11:50:23Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356294#M71543</link>
      <description>Which help file are you looking in?  If you're in autocad, the help menu has&lt;BR /&gt;
a submenu Developer help that will take you to areas pertinent to lisp and&lt;BR /&gt;
vba in autocad issues, however, some things you'll do in vb(a) are visual&lt;BR /&gt;
basic issues, so for help on that, go to the vbaide (alt + f11) and use the&lt;BR /&gt;
help menu there.  That will take you to the microsoft visual basic specific&lt;BR /&gt;
help files.  They are completely different help systems.  There you will&lt;BR /&gt;
find Left, Right, Mid, InStr, etc for string handling functions in vb(a)&lt;BR /&gt;
(and Format to format the result string to what you want to see)&lt;BR /&gt;
However, Bobby Jone's idea was the best - convert to real and do your&lt;BR /&gt;
"rounding" there, then reconvert to string to display.&lt;BR /&gt;
&lt;BR /&gt;
"Eric Stewart" &lt;MOC.CN-HCH&gt; wrote in message&lt;BR /&gt;
news:7632F295679373FF53B34F418BBCCE89@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; I can't find any info in the help file about Left Mid and Right functions.&lt;BR /&gt;
&amp;gt; I understand the principle though if I can find documentation.  I think&lt;BR /&gt;
I've&lt;BR /&gt;
&amp;gt; done something similar in JavaScript.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/MOC.CN-HCH&gt;</description>
      <pubDate>Mon, 19 Aug 2002 14:16:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356294#M71543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356295#M71544</link>
      <description>Eric,&lt;BR /&gt;
&lt;BR /&gt;
You can still use Bobby's excellent suggestion.  You just have to compose&lt;BR /&gt;
your own "rounding logic" based on what your output needs are.&lt;BR /&gt;
As you are aware, you're not really 'rounding' in a mathematical sense.&lt;BR /&gt;
You're converting some various inputs to some various desired outputs.  The&lt;BR /&gt;
logic of how you want to convert the inputs to outputs is for you to&lt;BR /&gt;
ecide( per one of my earlier posts).&lt;BR /&gt;
&lt;BR /&gt;
His point is that you can do the conversions easier using numbers than by&lt;BR /&gt;
parsing strings, but you're still going to have to write a conversion&lt;BR /&gt;
algorithm to change a given input value to an output value based on your&lt;BR /&gt;
requirements.  Whether those values are strings or numbers is not important,&lt;BR /&gt;
it just might be a few less lines of codes to convert the numbers than to&lt;BR /&gt;
parse the strings looking for inch signs and the like.&lt;BR /&gt;
&lt;BR /&gt;
What is the source of your input? Is the user picking a dimension entity?&lt;BR /&gt;
text entity? entering points for corners of a room? selecting a polyline&lt;BR /&gt;
representing a room? something else?&lt;BR /&gt;
What is your output?  Placing a piece of text on the drawing? filling a&lt;BR /&gt;
textbox in a dialog box? something else?&lt;BR /&gt;
Mark</description>
      <pubDate>Mon, 19 Aug 2002 14:27:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356295#M71544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-08-19T14:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Specific rounding question</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356296#M71545</link>
      <description>You're making this issue way too difficult.  Create a dimensions style with the rounding set to 2" - AutoCAD takes it from there.&lt;BR /&gt;
&lt;BR /&gt;
Steve Stone&lt;BR /&gt;
ES Tech</description>
      <pubDate>Mon, 26 Aug 2002 11:21:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356296#M71545</guid>
      <dc:creator>SteveStone9194</dc:creator>
      <dc:date>2002-08-26T11:21:35Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356297#M71546</link>
      <description>Sorry - that won't work.  I re-read your message and saw that 2" &amp;amp; 10" aren't valid.</description>
      <pubDate>Mon, 26 Aug 2002 11:28:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/specific-rounding-question/m-p/356297#M71546</guid>
      <dc:creator>SteveStone9194</dc:creator>
      <dc:date>2002-08-26T11:28:29Z</dc:date>
    </item>
  </channel>
</rss>

