<?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: Copy Title block , sheetformat , border from one drawing to another drawing in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647600#M113530</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;PRE&gt;Next
    For Each Item In InvDoc.BorderDefinitions
        If Item.IsReferenced = False Then Item.Delete&lt;/PRE&gt;&lt;P&gt;This means that if the item is referenced by your original document (the one you intend to change) that it doesn't delete the information?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;yes. but this code is there to prevent error messages, because you can not delete referenced blocks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;If I set this to True would it delete the information/border/titleblock that the original document is using?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;no, most likely it will just cause errors. besides, even if it would delete them, it would not delete the non-referenced stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;Secondly when I run this script it's somehow copying one titleblock 6 times and calls it copy of (titleblock name) then copy of copy of (titleblock name).&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;then delete or comment out the last for-next loop, as the remarks specifically warns you what is going to happen if you do that... did you not read them?&lt;/P&gt;&lt;HR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Tue, 21 Jul 2020 19:18:38 GMT</pubDate>
    <dc:creator>bshbsh</dc:creator>
    <dc:date>2020-07-21T19:18:38Z</dc:date>
    <item>
      <title>Copy Title block , sheetformat , border from one drawing to another drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/7127211#M72644</link>
      <description>Hi friends , i already know how to copy title block definition ,border but while copying sheet format i am facing issue.&lt;BR /&gt;&lt;BR /&gt;In Title block folder in Browser ,'Copy of ISO' comes while using copyto function for copying each sheet format.im sheet format i have more than 6 sheet formats. Kindly anyone give example to copy Title block , sheetformat , border from one drawing.</description>
      <pubDate>Sat, 03 Jun 2017 15:54:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/7127211#M72644</guid>
      <dc:creator>sripandian</dc:creator>
      <dc:date>2017-06-03T15:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Title block , sheetformat , border from one drawing to another drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/7128720#M72652</link>
      <description>&lt;P&gt;Here's something similar to what I use: (VBA code)&lt;/P&gt;
&lt;PRE&gt;Public Sub CopyDrawingResources()
    If ThisApplication.ActiveDocument Is Nothing Then
        Exit Sub
    Else
        If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then
            Dim InvDoc As Document
            Set InvDoc = ThisApplication.ActiveDocument
        Else
            Exit Sub
        End If
    End If
    Dim SourceDoc As DrawingDocument
    Set SourceDoc = ThisApplication.Documents.Open("PATH\TO\THE\SOURCE.idw", False)
    
    On Error Resume Next
    For Each Item In InvDoc.SheetFormats
        Item.Delete
    Next
    For Each Item In InvDoc.BorderDefinitions
        If Item.IsReferenced = False Then Item.Delete
    Next
    For Each Item In InvDoc.TitleBlockDefinitions
        If Item.IsReferenced = False Then Item.Delete
    Next
    For Each Item In InvDoc.SketchedSymbolDefinitions
        If Item.IsReferenced = False Then Item.Delete
    Next
    
    For Each Item In SourceDoc.BorderDefinitions
        Set TargetBorder = Item.CopyTo(InvDoc, True)
    Next
    For Each Item In SourceDoc.TitleBlockDefinitions
        Set TargetHeader = Item.CopyTo(InvDoc, True)
    Next
    For Each Item In SourceDoc.SketchedSymbolDefinitions
        Set TargetSymbol = Item.CopyTo(InvDoc, True)
    Next
    For Each Item In SourceDoc.SheetFormats
        'Caution: this creates a new copy of the TitleBlock used for EACH SheetFormat,
        'regardless if the TitleBlockDefinition already exists or not!!!
        Set TargetSheet = Item.CopyTo(InvDoc)
    Next
    On Error GoTo 0
    
    SourceDoc.ReleaseReference
    SourceDoc.Close (True)
    Set SourceDoc = Nothing
    
End Sub&lt;/PRE&gt;
&lt;P&gt;I do not copy the SheetFormats, because it makes a mess with a lot of copies of the titleblock. Does anyone know what's up with that and how to fix it? I can not replace the titleblockdefinitions in sheetformats, they're read-only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 10:21:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/7128720#M72652</guid>
      <dc:creator>bshbsh</dc:creator>
      <dc:date>2017-06-05T10:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Title block , sheetformat , border from one drawing to another drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647319#M113523</link>
      <description>&lt;P&gt;hey &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/534967"&gt;@bshbsh&lt;/a&gt;, you replied to my macro help the other day with this link.&amp;nbsp; Had a question for you about this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Next
    For Each Item In InvDoc.BorderDefinitions
        If Item.IsReferenced = False Then Item.Delete&lt;/PRE&gt;&lt;P&gt;This means that if the item is referenced by your original document (the one you intend to change) that it doesn't delete the information?&amp;nbsp; If I set this to True would it delete the information/border/titleblock that the original document is using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My way forward is going to be deleting the instance and copying in new ones and activating them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly when I run this script it's somehow copying one titleblock 6 times and calls it copy of (titleblock name) then copy of copy of (titleblock name).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 17:29:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647319#M113523</guid>
      <dc:creator>eric.frissell26WKQ</dc:creator>
      <dc:date>2020-07-21T17:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Title block , sheetformat , border from one drawing to another drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647600#M113530</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;PRE&gt;Next
    For Each Item In InvDoc.BorderDefinitions
        If Item.IsReferenced = False Then Item.Delete&lt;/PRE&gt;&lt;P&gt;This means that if the item is referenced by your original document (the one you intend to change) that it doesn't delete the information?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;yes. but this code is there to prevent error messages, because you can not delete referenced blocks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;If I set this to True would it delete the information/border/titleblock that the original document is using?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;no, most likely it will just cause errors. besides, even if it would delete them, it would not delete the non-referenced stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;Secondly when I run this script it's somehow copying one titleblock 6 times and calls it copy of (titleblock name) then copy of copy of (titleblock name).&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;then delete or comment out the last for-next loop, as the remarks specifically warns you what is going to happen if you do that... did you not read them?&lt;/P&gt;&lt;HR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 21 Jul 2020 19:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647600#M113530</guid>
      <dc:creator>bshbsh</dc:creator>
      <dc:date>2020-07-21T19:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Title block , sheetformat , border from one drawing to another drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647664#M113532</link>
      <description>&lt;P&gt;I was able to find some of the errors but I see what you're saying by not deleting the referenced code&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 19:43:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-title-block-sheetformat-border-from-one-drawing-to-another/m-p/9647664#M113532</guid>
      <dc:creator>eric.frissell26WKQ</dc:creator>
      <dc:date>2020-07-21T19:43:51Z</dc:date>
    </item>
  </channel>
</rss>

