<?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: Converting from ACI to RGB in AC2021 in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/converting-from-aci-to-rgb-in-ac2021/m-p/10295334#M3371</link>
    <description>&lt;P&gt;This will work:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Adesk::ColorRef cref = acedGetRGB(ic);&lt;BR /&gt;int rv = GetRValue(cref);&lt;BR /&gt;int gv = GetGValue(cref);&lt;BR /&gt;int bv = GetBValue(cref);&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 15:19:11 GMT</pubDate>
    <dc:creator>dajum</dc:creator>
    <dc:date>2021-05-06T15:19:11Z</dc:date>
    <item>
      <title>Converting from ACI to RGB in AC2021</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/converting-from-aci-to-rgb-in-ac2021/m-p/10295217#M3370</link>
      <description>&lt;P&gt;I'm trying to use AcCmColor to convert from ACI to RGB and it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;union {&lt;BR /&gt;Adesk::UInt32 val;&lt;BR /&gt;Adesk::UInt8 rgbs[4];&lt;BR /&gt;} c;&lt;BR /&gt;AcCmColor s;&lt;BR /&gt;Adesk::UInt16 ic;&lt;BR /&gt;ic = inletColor;&lt;BR /&gt;Acad::ErrorStatus es = s.setColorIndex(ic);&lt;BR /&gt;c.val = s.getRGB();&lt;BR /&gt;int r = s.red();&lt;BR /&gt;int g = s.green();&lt;BR /&gt;int b = s.blue();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last 4 lines all return zero.&amp;nbsp; ic=5 and I can see the value in s looks okay with blue=5. mData values are fine. So why do all these methods fail in 2021? Since the SetColorMethod is deprecated I can't change the method. Is that why it fails? How to do this?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 14:42:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/converting-from-aci-to-rgb-in-ac2021/m-p/10295217#M3370</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2021-05-06T14:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from ACI to RGB in AC2021</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/converting-from-aci-to-rgb-in-ac2021/m-p/10295334#M3371</link>
      <description>&lt;P&gt;This will work:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Adesk::ColorRef cref = acedGetRGB(ic);&lt;BR /&gt;int rv = GetRValue(cref);&lt;BR /&gt;int gv = GetGValue(cref);&lt;BR /&gt;int bv = GetBValue(cref);&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 15:19:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/converting-from-aci-to-rgb-in-ac2021/m-p/10295334#M3371</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2021-05-06T15:19:11Z</dc:date>
    </item>
  </channel>
</rss>

