<?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 How to Set IsByLayer color and assign it to an Entity in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-set-isbylayer-color-and-assign-it-to-an-entity/m-p/5475674#M41651</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the RealDWG2015 sdk. I am using it to export into dwg my own representation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I create the layer first and I assign a color like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LayerTable layerTable = (LayerTable)tr.GetObject(db.LayerTableId, OpenMode.ForWrite);&lt;BR /&gt;LayerTableRecord record = new LayerTableRecord();&lt;BR /&gt;record.Name = "my layer"&lt;BR /&gt;record.Color = Autodesk.AutoCAD.Colors.Color.FromColorIndex(ColorMethod.ByAci, 0); //I want it black&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, If I create an entity i dont see a method to create a color and set the "IsByLayer" property to TRUE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want the color of the entity set to&amp;nbsp;&lt;SPAN&gt;IsByLayer so, please correct me if I am wrong, it will have the opposite color of the layer backgroun (white).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jan 2015 13:59:41 GMT</pubDate>
    <dc:creator>cgcamilo</dc:creator>
    <dc:date>2015-01-20T13:59:41Z</dc:date>
    <item>
      <title>How to Set IsByLayer color and assign it to an Entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-isbylayer-color-and-assign-it-to-an-entity/m-p/5475674#M41651</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the RealDWG2015 sdk. I am using it to export into dwg my own representation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I create the layer first and I assign a color like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LayerTable layerTable = (LayerTable)tr.GetObject(db.LayerTableId, OpenMode.ForWrite);&lt;BR /&gt;LayerTableRecord record = new LayerTableRecord();&lt;BR /&gt;record.Name = "my layer"&lt;BR /&gt;record.Color = Autodesk.AutoCAD.Colors.Color.FromColorIndex(ColorMethod.ByAci, 0); //I want it black&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, If I create an entity i dont see a method to create a color and set the "IsByLayer" property to TRUE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want the color of the entity set to&amp;nbsp;&lt;SPAN&gt;IsByLayer so, please correct me if I am wrong, it will have the opposite color of the layer backgroun (white).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jan 2015 13:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-isbylayer-color-and-assign-it-to-an-entity/m-p/5475674#M41651</guid>
      <dc:creator>cgcamilo</dc:creator>
      <dc:date>2015-01-20T13:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set IsByLayer color and assign it to an Entity</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-set-isbylayer-color-and-assign-it-to-an-entity/m-p/5476638#M41652</link>
      <description>Try:&lt;BR /&gt;dbEnt.Color = Color.FromColorIndex(ColorMethod.ByLayer, 256);</description>
      <pubDate>Wed, 21 Jan 2015 03:48:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-set-isbylayer-color-and-assign-it-to-an-entity/m-p/5476638#M41652</guid>
      <dc:creator>jabowabo</dc:creator>
      <dc:date>2015-01-21T03:48:58Z</dc:date>
    </item>
  </channel>
</rss>

