<?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: Ilogic save as every sheets as an independent .idw in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790562#M149634</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11908562"&gt;@MKE_Howard&lt;/a&gt;.&amp;nbsp; Maybe this simple example will work for you, or at least get you the needed information to build your own similar version.&amp;nbsp; The key method here is the Sheet.CopyTo method, that copies a sheet from the current drawing to another drawing.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oPathAndName As String = ThisDoc.PathAndFileName(Fasle)
For Each oSheet As Sheet In oDDoc.Sheets
	Dim oNewIDW As DrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject)
	Dim oCopiedSheet As Sheet = oSheet.CopyTo(oNewIDW)
	For Each oSht As Sheet In oNewIDW.Sheets
		If oSht IsNot oCopiedSheet Then oSht.Delete
	Next
	'need code here to provide different file name to each new document
	Dim oNewFullFileName As String = oPathAndName &amp;amp; "-" &amp;amp; oSheet.Name &amp;amp; ".idw"
	oNewIDW.SaveAs(oNewFullFileName, False)
Next&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 15:01:25 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2023-03-01T15:01:25Z</dc:date>
    <item>
      <title>Ilogic save as every sheets as an independent .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790438#M149628</link>
      <description>&lt;P&gt;Hi, Ive been trying to find a code that could save as my sheets to a new .idw file. I tried some code that I found on the forum but it save as .pdf.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do someone have an idea how I can do this? Thanks a lot&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 14:28:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790438#M149628</guid>
      <dc:creator>MKE_Howard</dc:creator>
      <dc:date>2023-03-01T14:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic save as every sheets as an independent .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790562#M149634</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11908562"&gt;@MKE_Howard&lt;/a&gt;.&amp;nbsp; Maybe this simple example will work for you, or at least get you the needed information to build your own similar version.&amp;nbsp; The key method here is the Sheet.CopyTo method, that copies a sheet from the current drawing to another drawing.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oPathAndName As String = ThisDoc.PathAndFileName(Fasle)
For Each oSheet As Sheet In oDDoc.Sheets
	Dim oNewIDW As DrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject)
	Dim oCopiedSheet As Sheet = oSheet.CopyTo(oNewIDW)
	For Each oSht As Sheet In oNewIDW.Sheets
		If oSht IsNot oCopiedSheet Then oSht.Delete
	Next
	'need code here to provide different file name to each new document
	Dim oNewFullFileName As String = oPathAndName &amp;amp; "-" &amp;amp; oSheet.Name &amp;amp; ".idw"
	oNewIDW.SaveAs(oNewFullFileName, False)
Next&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 15:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790562#M149634</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-03-01T15:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ilogic save as every sheets as an independent .idw</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790638#M149636</link>
      <description>Give me a couple hours to find the time and to try this... Ill get back to you thanks a lot</description>
      <pubDate>Wed, 01 Mar 2023 15:27:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-save-as-every-sheets-as-an-independent-idw/m-p/11790638#M149636</guid>
      <dc:creator>MKE_Howard</dc:creator>
      <dc:date>2023-03-01T15:27:39Z</dc:date>
    </item>
  </channel>
</rss>

