<?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 Re: Which Flag Is Set (ie 1, 2, 4,16,32,64,...) in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241609#M46357</link>
    <description>If RetrievedValue And acLsFrozen Then&lt;BR /&gt;
   'acLsFrozen bit is set&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
If RetrievedValue And acLsColor Then&lt;BR /&gt;
   'acLsColor bit is set&lt;BR /&gt;
End If</description>
    <pubDate>Fri, 04 Feb 2005 22:25:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-02-04T22:25:11Z</dc:date>
    <item>
      <title>Which Flag Is Set (ie 1, 2, 4,16,32,64,...)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241608#M46356</link>
      <description>I'm working with some code that deals with the layer states and the optional flag to determine which props to save.&lt;BR /&gt;
&lt;BR /&gt;
Initially, I was going to store the sum of the flags using savesettings, until i realized I don't know how to "parse" the total into the individual flags.  Could someone give a hint or a little code?&lt;BR /&gt;
&lt;BR /&gt;
Edit: I need to figure out which flags are set so that i can mark the appropriate check box (just like the options for the native layer states)&lt;BR /&gt;
&lt;BR /&gt;
Here are the codes I'm working with&lt;BR /&gt;
&lt;BR /&gt;
acLsNone	                       0&lt;BR /&gt;
acLsOn	                       1&lt;BR /&gt;
acLsFrozen 	                       2&lt;BR /&gt;
acLsLocked	                       4&lt;BR /&gt;
acLsPlot	                       8&lt;BR /&gt;
acLsNewViewport	 16&lt;BR /&gt;
acLsColor	                      32&lt;BR /&gt;
acLsLineType	 64&lt;BR /&gt;
acLsLineWeight	128&lt;BR /&gt;
acLsPlotStyle	256&lt;BR /&gt;
acLsAll	                     65535&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
TIA!

&lt;BR /&gt;
Message was edited by: Oberer</description>
      <pubDate>Fri, 04 Feb 2005 19:36:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241608#M46356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-02-04T19:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Which Flag Is Set (ie 1, 2, 4,16,32,64,...)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241609#M46357</link>
      <description>If RetrievedValue And acLsFrozen Then&lt;BR /&gt;
   'acLsFrozen bit is set&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
If RetrievedValue And acLsColor Then&lt;BR /&gt;
   'acLsColor bit is set&lt;BR /&gt;
End If</description>
      <pubDate>Fri, 04 Feb 2005 22:25:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241609#M46357</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-02-04T22:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Which Flag Is Set (ie 1, 2, 4,16,32,64,...)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241610#M46358</link>
      <description>Hi Oberer

This function returns the bitwise AND:
[code]
Public Function MeBitwAnd(FstVal As Integer, NxtVal As Integer) As Boolean

  MeBitwAnd = (((FstVal And NxtVal) = NxtVal) Or (FstVal = 0))

End Function
[/code]
Samples:
?MeBitwAnd(9, 8)
True
?MeBitwAnd(9, 2)
False

Cheers
-- 
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch</description>
      <pubDate>Sat, 05 Feb 2005 09:45:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241610#M46358</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-02-05T09:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Which Flag Is Set (ie 1, 2, 4,16,32,64,...)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241611#M46359</link>
      <description>I obviously didn't realize it was that simple &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
thanks!</description>
      <pubDate>Mon, 07 Feb 2005 15:52:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/which-flag-is-set-ie-1-2-4-16-32-64/m-p/1241611#M46359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-02-07T15:52:02Z</dc:date>
    </item>
  </channel>
</rss>

