<?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: How to Get properties  of the Layer in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453551#M71287</link>
    <description>This is a sub that I wrote in VB.NET to change a layer's freeze state. With the quick research I did I could not find a mechanism for finding a specific layer without looping through them...&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
     Sub freezeMe(ByRef tr As Transaction, ByVal lname As String, ByVal freeze As Boolean)&lt;BR /&gt;
            Dim lt As LayerTable = tr.GetObject(HostApplicationServices.WorkingDatabase.LayerTableId, OpenMode.ForWrite, False, False)&lt;BR /&gt;
            For Each i In lt&lt;BR /&gt;
                Dim tt As LayerTableRecord = tr.GetObject(i.GetObject(OpenMode.ForWrite).ObjectId, OpenMode.ForWrite, False, False)&lt;BR /&gt;
                If tt.Name = lname Then&lt;BR /&gt;
                    tt.IsFrozen = freeze&lt;BR /&gt;
                End If&lt;BR /&gt;
            Next&lt;BR /&gt;
        End Sub&lt;BR /&gt;
{code}&lt;BR /&gt;
Each element in the LayerTableRecord has properties of the layers such as isFrozen, isLocked, etc. See the helpfiles for a full list of properties.&lt;BR /&gt;
&lt;BR /&gt;
Opening a drawing is fairly well documented in the samples, helpfiles and on these forums.</description>
    <pubDate>Thu, 23 Apr 2009 18:35:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-04-23T18:35:34Z</dc:date>
    <item>
      <title>How to Get properties  of the Layer</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453549#M71285</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
I am new to autocad.net . i have couple of doubt's &lt;BR /&gt;
&lt;BR /&gt;
1) how to list all the layer in a diagram &lt;BR /&gt;
2) how to read each layer properties  ??&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
i am using DotnetARX &amp;amp; c# to access the file . If anyone have sample file to show how to access diagram and it's entity properties . can you send it to me ?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the help&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Elam</description>
      <pubDate>Tue, 24 Mar 2009 19:07:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453549#M71285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-24T19:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get properties  of the Layer</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453550#M71286</link>
      <description>Good luck getting help on these forums. More than likely you will get Tony Tanzillo telling you what an idiot you are for even asking.&lt;BR /&gt;
&lt;BR /&gt;
my experience with ADN was not much better. you would think that paying $1300 for tech support would render something useful.</description>
      <pubDate>Wed, 22 Apr 2009 21:13:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453550#M71286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-22T21:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get properties  of the Layer</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453551#M71287</link>
      <description>This is a sub that I wrote in VB.NET to change a layer's freeze state. With the quick research I did I could not find a mechanism for finding a specific layer without looping through them...&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
     Sub freezeMe(ByRef tr As Transaction, ByVal lname As String, ByVal freeze As Boolean)&lt;BR /&gt;
            Dim lt As LayerTable = tr.GetObject(HostApplicationServices.WorkingDatabase.LayerTableId, OpenMode.ForWrite, False, False)&lt;BR /&gt;
            For Each i In lt&lt;BR /&gt;
                Dim tt As LayerTableRecord = tr.GetObject(i.GetObject(OpenMode.ForWrite).ObjectId, OpenMode.ForWrite, False, False)&lt;BR /&gt;
                If tt.Name = lname Then&lt;BR /&gt;
                    tt.IsFrozen = freeze&lt;BR /&gt;
                End If&lt;BR /&gt;
            Next&lt;BR /&gt;
        End Sub&lt;BR /&gt;
{code}&lt;BR /&gt;
Each element in the LayerTableRecord has properties of the layers such as isFrozen, isLocked, etc. See the helpfiles for a full list of properties.&lt;BR /&gt;
&lt;BR /&gt;
Opening a drawing is fairly well documented in the samples, helpfiles and on these forums.</description>
      <pubDate>Thu, 23 Apr 2009 18:35:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-properties-of-the-layer/m-p/2453551#M71287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-23T18:35:34Z</dc:date>
    </item>
  </channel>
</rss>

