<?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: FromColor in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427269#M83893</link>
    <description>Indeed this is a bug. I'll make sure that it gets fixed.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4952333@discussion.autodesk.com...&lt;BR /&gt;
Because its broken.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;DAVIDGARNER&gt; wrote in message news:4951971@discussion.autodesk.com...&lt;BR /&gt;
Pehaps I havn't made myself clear.&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to find out why the FromColor method throws an exception when &lt;BR /&gt;
passed a System.Drawing.Color enumerated value.&lt;BR /&gt;
&lt;BR /&gt;
My code recieves as a parameter a System.Drawing.Color (not three RGB &lt;BR /&gt;
values).  While I can use the System.Drawing.Color.R and .B and .G &lt;BR /&gt;
properties and the FromRgb method, it is much clearer code to use the &lt;BR /&gt;
variable that is passed.&lt;BR /&gt;
&lt;BR /&gt;
So, once again I'll ask, what am I doing wrong that is causing the FromColor &lt;BR /&gt;
method to throw an exception?&lt;/DAVIDGARNER&gt;&lt;/TONY.TANZILLO&gt;</description>
    <pubDate>Sun, 11 Sep 2005 18:13:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-09-11T18:13:26Z</dc:date>
    <item>
      <title>FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427262#M83886</link>
      <description>I'm executing the following statement (or trying to at least):&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.Colors.Color acadColor = &lt;BR /&gt;
     Autodesk.AutoCAD.Colors.Color.FromColor( System.Drawing.Color.Yellow );&lt;BR /&gt;
&lt;BR /&gt;
This throws an exception with the message "eInvalidInput"&lt;BR /&gt;
&lt;BR /&gt;
Any ideas why this command is throwing an expection?</description>
      <pubDate>Thu, 08 Sep 2005 21:45:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427262#M83886</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-08T21:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427263#M83887</link>
      <description>I use the FromRgb:&lt;BR /&gt;
&lt;BR /&gt;
Dim color As Autodesk.AutoCAD.Colors.Color&lt;BR /&gt;
color = Autodesk.AutoCAD.Colors.Color.FromRgb(255, 255, 255)</description>
      <pubDate>Fri, 09 Sep 2005 11:27:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427263#M83887</guid>
      <dc:creator>Mikko</dc:creator>
      <dc:date>2005-09-09T11:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427264#M83888</link>
      <description>Thanks Mikko&lt;BR /&gt;
&lt;BR /&gt;
Yes, the FromRgb method works fine.&lt;BR /&gt;
&lt;BR /&gt;
But, what is wrong with the Autodesk.AutoCAD.Colors.Color.FromColor( System.Drawing.Color) method.&lt;BR /&gt;
&lt;BR /&gt;
My code is passes a System.Drawing.Color enumeration and I don't want to have to convert it to RGB.&lt;BR /&gt;
&lt;BR /&gt;
it makes for really ugly code&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAC.Colors.Color.FromRgb( System.Drawing.Color.Yellow.R, System.Drawing.Color.Yellow.G, System.Drawing.Color.Yellow.B )</description>
      <pubDate>Fri, 09 Sep 2005 16:11:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427264#M83888</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-09T16:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427265#M83889</link>
      <description>I'd use numeric numbers.&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.Colors.Color.FromRgb(255, 255, 0)</description>
      <pubDate>Fri, 09 Sep 2005 17:01:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427265#M83889</guid>
      <dc:creator>Mikko</dc:creator>
      <dc:date>2005-09-09T17:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427266#M83890</link>
      <description>Pehaps I havn't made myself clear.&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to find out why the FromColor method throws an exception when passed a System.Drawing.Color enumerated value.&lt;BR /&gt;
&lt;BR /&gt;
My code recieves as a parameter a System.Drawing.Color (not three RGB values).  While I can use the System.Drawing.Color.R and .B and .G properties and the FromRgb method, it is much clearer code to use the variable that is passed.&lt;BR /&gt;
&lt;BR /&gt;
So, once again I'll ask, what am I doing wrong that is causing the FromColor method to throw an exception?</description>
      <pubDate>Fri, 09 Sep 2005 17:23:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427266#M83890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-09T17:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427267#M83891</link>
      <description>Hmm, I get that same error using FromColor.  FromColorIndex works.  I have no idea how to use FromColor.  Might look at that at another time.&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.Colors.Color.FromColorIndex(ColorMethod.ByAci, 2)</description>
      <pubDate>Fri, 09 Sep 2005 18:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427267#M83891</guid>
      <dc:creator>Mikko</dc:creator>
      <dc:date>2005-09-09T18:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427268#M83892</link>
      <description>Because its broken.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;DAVIDGARNER&gt; wrote in message news:4951971@discussion.autodesk.com...&lt;BR /&gt;
Pehaps I havn't made myself clear.&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to find out why the FromColor method throws an exception when passed a System.Drawing.Color enumerated value.&lt;BR /&gt;
&lt;BR /&gt;
My code recieves as a parameter a System.Drawing.Color (not three RGB values).  While I can use the System.Drawing.Color.R and .B and .G properties and the FromRgb method, it is much clearer code to use the variable that is passed.&lt;BR /&gt;
&lt;BR /&gt;
So, once again I'll ask, what am I doing wrong that is causing the FromColor method to throw an exception?&lt;/DAVIDGARNER&gt;</description>
      <pubDate>Fri, 09 Sep 2005 21:02:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427268#M83892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-09T21:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: FromColor</title>
      <link>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427269#M83893</link>
      <description>Indeed this is a bug. I'll make sure that it gets fixed.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4952333@discussion.autodesk.com...&lt;BR /&gt;
Because its broken.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;DAVIDGARNER&gt; wrote in message news:4951971@discussion.autodesk.com...&lt;BR /&gt;
Pehaps I havn't made myself clear.&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to find out why the FromColor method throws an exception when &lt;BR /&gt;
passed a System.Drawing.Color enumerated value.&lt;BR /&gt;
&lt;BR /&gt;
My code recieves as a parameter a System.Drawing.Color (not three RGB &lt;BR /&gt;
values).  While I can use the System.Drawing.Color.R and .B and .G &lt;BR /&gt;
properties and the FromRgb method, it is much clearer code to use the &lt;BR /&gt;
variable that is passed.&lt;BR /&gt;
&lt;BR /&gt;
So, once again I'll ask, what am I doing wrong that is causing the FromColor &lt;BR /&gt;
method to throw an exception?&lt;/DAVIDGARNER&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Sun, 11 Sep 2005 18:13:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/fromcolor/m-p/1427269#M83893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-09-11T18:13:26Z</dc:date>
    </item>
  </channel>
</rss>

