<?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 Copy a Layer and its entities to another dwg in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332927#M89148</link>
    <description>Can you copy a layer and all its entities to another drawing? Is there an&lt;BR /&gt;
example that you can point me to?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Brent</description>
    <pubDate>Mon, 27 Nov 2000 13:18:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-11-27T13:18:04Z</dc:date>
    <item>
      <title>Copy a Layer and its entities to another dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332927#M89148</link>
      <description>Can you copy a layer and all its entities to another drawing? Is there an&lt;BR /&gt;
example that you can point me to?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Brent</description>
      <pubDate>Mon, 27 Nov 2000 13:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332927#M89148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-27T13:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Copy a Layer and its entities to another dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332928#M89149</link>
      <description>Yes you can do this, but first I would have to ask you&lt;BR /&gt;
if you want to include objects inside of blocks, that&lt;BR /&gt;
reside on the layer you want to copy, before suggesting&lt;BR /&gt;
a way of doing that.&lt;BR /&gt;
&lt;BR /&gt;
"Brent B." wrote:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Can you copy a layer and all its entities to another drawing? Is there an&lt;BR /&gt;
&amp;gt; example that you can point me to?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Brent&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Copyright ©2000  Tony Tanzillo  all rights reserved&lt;BR /&gt;
All use of the contents of this article is subject to the &lt;BR /&gt;
terms and conditions at http://www.caddzone.com/license.htm&lt;BR /&gt;
&lt;BR /&gt;
Check out DWGInfoTip at http://www.caddzone.com/dwginfo.htm&lt;BR /&gt;
&lt;BR /&gt;
/*********************************************************/&lt;BR /&gt;
/*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
/* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
/* ----------------------------------------------------- */&lt;BR /&gt;
/*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
/*               http://www.caddzone.com                 */&lt;BR /&gt;
/*********************************************************/</description>
      <pubDate>Mon, 27 Nov 2000 13:48:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332928#M89149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-27T13:48:57Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332929#M89150</link>
      <description>As it currently stands, I do not need to include objects in blocks that&lt;BR /&gt;
might reside on the layer being copied.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:3A22D6C9.C9892993@worldnet.att.net...&lt;BR /&gt;
&amp;gt; Yes you can do this, but first I would have to ask you&lt;BR /&gt;
&amp;gt; if you want to include objects inside of blocks, that&lt;BR /&gt;
&amp;gt; reside on the layer you want to copy, before suggesting&lt;BR /&gt;
&amp;gt; a way of doing that.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Brent B." wrote:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Can you copy a layer and all its entities to another drawing? Is there&lt;BR /&gt;
an&lt;BR /&gt;
&amp;gt; &amp;gt; example that you can point me to?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Brent&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; Copyright ©2000  Tony Tanzillo  all rights reserved&lt;BR /&gt;
&amp;gt; All use of the contents of this article is subject to the&lt;BR /&gt;
&amp;gt; terms and conditions at http://www.caddzone.com/license.htm&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Check out DWGInfoTip at http://www.caddzone.com/dwginfo.htm&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; /*               http://www.caddzone.com                 */&lt;BR /&gt;
&amp;gt; /*********************************************************/&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Mon, 27 Nov 2000 15:56:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332929#M89150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-27T15:56:06Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332930#M89151</link>
      <description>You'll need to test this yourself. It accepts a Layer&lt;BR /&gt;
object and either a block, Modelspace or PaperSpace&lt;BR /&gt;
object, and copies all paper/modelspace entities on&lt;BR /&gt;
the specified layer, to the specified block, paper&lt;BR /&gt;
or model space (of any document).&lt;BR /&gt;
&lt;BR /&gt;
To copy the objects to the model space of another&lt;BR /&gt;
document, specify the layer in the source document,&lt;BR /&gt;
and the Modelspace property of the target document.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub CopyLayer(Layer As AcadLayer, Target As AcadBlock)&lt;BR /&gt;
    Dim SS As AcadSelectionSet&lt;BR /&gt;
    Dim SrcDoc As AcadDocument&lt;BR /&gt;
    Set SrcDoc = Layer.Document&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Set SS = SrcDoc.SelectionSets.Add("$COPYTOLAYER$")&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        Err.Clear&lt;BR /&gt;
        Set SS = SrcDoc.SelectionSets("$COPYTOLAYER$")&lt;BR /&gt;
        SS.Clear&lt;BR /&gt;
    End If&lt;BR /&gt;
    Dim vaType(0 To 0) As Integer&lt;BR /&gt;
    Dim vaData(0 To 0) As Variant&lt;BR /&gt;
    vaType(0) = 8&lt;BR /&gt;
    vaData(0) = Layer.Name&lt;BR /&gt;
    SS.Select acSelectionSetAll, , , vaType, vaData&lt;BR /&gt;
    If SS.Count = 0 Then&lt;BR /&gt;
        SS.Delete&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    Dim i As Integer&lt;BR /&gt;
    Dim objArray() As AcadEntity&lt;BR /&gt;
    ReDim objArray(0 To SS.Count - 1)&lt;BR /&gt;
    For i = 0 To SS.Count - 1&lt;BR /&gt;
        Set objArray(i) = SS(i)&lt;BR /&gt;
    Next i&lt;BR /&gt;
    SrcDoc.CopyObjects objArray, Target&lt;BR /&gt;
    SS.Delete&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
"Brent B." wrote:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;  As it currently stands, I do not need to include objects in blocks that&lt;BR /&gt;
&amp;gt; might reside on the layer being copied.&lt;BR /&gt;
&amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; "Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:3A22D6C9.C9892993@worldnet.att.net...&lt;BR /&gt;
&amp;gt; &amp;gt; Yes you can do this, but first I would have to ask you&lt;BR /&gt;
&amp;gt; &amp;gt; if you want to include objects inside of blocks, that&lt;BR /&gt;
&amp;gt; &amp;gt; reside on the layer you want to copy, before suggesting&lt;BR /&gt;
&amp;gt; &amp;gt; a way of doing that.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; "Brent B." wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Can you copy a layer and all its entities to another drawing? Is there&lt;BR /&gt;
&amp;gt; an&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; example that you can point me to?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Brent&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; Copyright ©2000  Tony Tanzillo  all rights reserved&lt;BR /&gt;
&amp;gt; &amp;gt; All use of the contents of this article is subject to the&lt;BR /&gt;
&amp;gt; &amp;gt; terms and conditions at http://www.caddzone.com/license.htm&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Check out DWGInfoTip at http://www.caddzone.com/dwginfo.htm&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; &amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; &amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; &amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; &amp;gt; /*               http://www.caddzone.com                 */&lt;BR /&gt;
&amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Copyright ©2000  Tony Tanzillo  all rights reserved&lt;BR /&gt;
All use of the contents of this article is subject to the &lt;BR /&gt;
terms and conditions at http://www.caddzone.com/license.htm&lt;BR /&gt;
&lt;BR /&gt;
Check out DWGInfoTip at http://www.caddzone.com/dwginfo.htm&lt;BR /&gt;
&lt;BR /&gt;
/*********************************************************/&lt;BR /&gt;
/*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
/* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
/* ----------------------------------------------------- */&lt;BR /&gt;
/*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
/*               http://www.caddzone.com                 */&lt;BR /&gt;
/*********************************************************/&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Mon, 27 Nov 2000 18:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332930#M89151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-27T18:11:35Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332931#M89152</link>
      <description>Thank you for your response.&lt;BR /&gt;
&lt;BR /&gt;
Is there significance to the selection set name that is used&lt;BR /&gt;
("$COPYTOLAYER$")? Does the "$" symbol at the begining and end have a&lt;BR /&gt;
particular purpose or function?</description>
      <pubDate>Tue, 28 Nov 2000 01:47:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/copy-a-layer-and-its-entities-to-another-dwg/m-p/332931#M89152</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-28T01:47:36Z</dc:date>
    </item>
  </channel>
</rss>

