<?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: multiple sheet idw titleblock and borders in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592944#M55330</link>
    <description>&lt;P&gt;Thank you - that sounds like what I need.&amp;nbsp; When trying it with some sample code found online, though, I get a "parameter is incorrect" error for the .Add line.&amp;nbsp; Code is below - and I have no idea what I should put into the oName variable, assuming I can get the code to go that far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oTemp As String
Dim oDrawDoc As DrawingDocument
Dim oName As String
Dim oSheet As Sheet
Dim oModel As Document
Dim oFormat As SheetFormat

oTemp = "C:\Users\Public\Public Documents\Autodesk\Inventor 2014\Templates\English\Ticket Template.dwg"
oDrawDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, oTemp, False)
oModel = ThisApplication.ActiveDocument
oName = "А, 1"
oFormat = oDrawDoc.SheetFormats.Item(oName)
oSheet = oDrawDoc.Sheets.AddUsingSheetFormat(oFormat, oModel)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2015 12:45:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-15T12:45:09Z</dc:date>
    <item>
      <title>multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5511295#M54183</link>
      <description>&lt;P&gt;Ok, this should be very easy, even though I'm not able to find an answer:&lt;/P&gt;&lt;P&gt;let's say I have an 1page idw (A3.idw), and I want to add a new sheet, with the same border and titleblock of page 1. Of course I would like to do it with ilogic, running it from an .ipt file.&lt;/P&gt;&lt;P&gt;I simply want&amp;nbsp;to set something like&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; oSheet2 titlebloc = &amp;nbsp;oSheet1 title block&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; oSheet2 border&amp;nbsp;= oSheet1&amp;nbsp;border&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet1&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;sheet&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet2&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;sheet&lt;/SPAN&gt;

&lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Documents&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Open&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;c:\A3.idw&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;oSheet1&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Sheets&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Item&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;oSheet2&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Sheets&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;add&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;BR /&gt;oSheet2&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;TitleBlock&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;oSheet1&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;TitleBlock&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;BR /&gt;SyntaxEditor Code Snippet&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Feb 2015 15:13:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5511295#M54183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5512586#M54198</link>
      <description>&lt;P&gt;It seems that I cannot access to border or text box of an idw when I'm running a rule from an ipt or an iam, is that true?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 12:10:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5512586#M54198</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-19T12:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5513113#M54207</link>
      <description>&lt;P&gt;If i understand good, what you need is just right click on sheet and add new sheet.&lt;/P&gt;&lt;P&gt;Do you have template??? Just ask.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 17:09:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5513113#M54207</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2015-02-19T17:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5513909#M54217</link>
      <description>&lt;P&gt;Yes, I have a template, when I do the sheets.Add() command, a new sheet is generated, but it is completly white. &amp;nbsp;I activate that sheet an try to acceess to titleblock or border (thisdoc.activesheet.border='Default border') to change it, but an error message is shown and says "border is read only".&lt;/P&gt;&lt;P&gt;Really do not know what to do....&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2015 07:10:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5513909#M54217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-20T07:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5591642#M55300</link>
      <description>&lt;P&gt;massimomarconi - did you find a solution for this?&amp;nbsp; I am looking for the same thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 16:07:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5591642#M55300</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-14T16:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592103#M55309</link>
      <description>&lt;P&gt;You can try the .AddUsingSheetFormat method if you have a predetermined layout. Can even add symbols and views, so it is by far the simplest way to accomplish adding a sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 20:44:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592103#M55309</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-14T20:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592944#M55330</link>
      <description>&lt;P&gt;Thank you - that sounds like what I need.&amp;nbsp; When trying it with some sample code found online, though, I get a "parameter is incorrect" error for the .Add line.&amp;nbsp; Code is below - and I have no idea what I should put into the oName variable, assuming I can get the code to go that far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oTemp As String
Dim oDrawDoc As DrawingDocument
Dim oName As String
Dim oSheet As Sheet
Dim oModel As Document
Dim oFormat As SheetFormat

oTemp = "C:\Users\Public\Public Documents\Autodesk\Inventor 2014\Templates\English\Ticket Template.dwg"
oDrawDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, oTemp, False)
oModel = ThisApplication.ActiveDocument
oName = "А, 1"
oFormat = oDrawDoc.SheetFormats.Item(oName)
oSheet = oDrawDoc.Sheets.AddUsingSheetFormat(oFormat, oModel)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2015 12:45:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592944#M55330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-15T12:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592984#M55334</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;For the .Add, why it is failing, it doesn't look like anything with syntax to me, so maybe try starting a new doc with that template and see if there is anything unexpected going on, or check your file location. - Actually, looking now the .dwg seems weird to me (I only work with .idw). Is it an inventor dwg? have you actually tried opening this file directly in inventor before?&lt;BR /&gt;&lt;BR /&gt;As for the name, it just needs to be as it appears in it's node under sheet formats, so the format you have with quotes is correct. You could also use them item # that corresponds to it's position in the list; 1 through whatever you may have.&lt;BR /&gt;&lt;BR /&gt;Also, for add using sheet format, you have to be very careful if the template has a model in or not; writing the line for the opposite case with throw a parameter error.&lt;BR /&gt;&lt;BR /&gt;Other than that, It all looks fine to me.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Apr 2015 13:04:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5592984#M55334</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-15T13:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5593154#M55342</link>
      <description>&lt;P&gt;Justin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the dwg file - that's one of our standard templates.&amp;nbsp; When we switched to Inventor a year ago, we opted to use dwg drawings instead of idw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no model in the template.&amp;nbsp; Since the rule is only in the template file, that should never be an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that I'm giving up on this and just adding a sheet as the original poster did, then formatting it.&amp;nbsp; It turns out that it's less work than I expected.&amp;nbsp; Thanks for all your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2015 14:14:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5593154#M55342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-15T14:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: multiple sheet idw titleblock and borders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5593177#M55343</link>
      <description>I believe that adding the sheet format using the oModel will be giving you an error then.&lt;BR /&gt;&lt;BR /&gt;Good Luck, anyways.</description>
      <pubDate>Wed, 15 Apr 2015 14:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/multiple-sheet-idw-titleblock-and-borders/m-p/5593177#M55343</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-15T14:25:10Z</dc:date>
    </item>
  </channel>
</rss>

