<?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 rule: IDW with Flat Pattern in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-idw-with-flat-pattern/m-p/5511168#M386155</link>
    <description>&lt;P&gt;Thank Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have somthing funny happen now. The scrips runs and i see it saves the dxf but the file never shows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried the Export IDW to DXF scrip that is under My Snippets and now I get a zip file with the DXF in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the code that I have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oDoc As DrawingDocument&lt;BR /&gt;Dim oSheet As Sheet&lt;BR /&gt;Dim oSheets As Sheets&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt; oDoc = ThisDrawing.Document&lt;BR /&gt;Catch&lt;BR /&gt;' MsgBox("Must be ran on a drawing document!",vbOKOnly,"Error")&lt;BR /&gt; Exit Sub&lt;BR /&gt;End Try&lt;BR /&gt;&lt;BR /&gt;oSheets = oDoc.Sheets&lt;BR /&gt;For Each oSheet In oSheets&lt;BR /&gt; Try&lt;BR /&gt; If oSheet.DrawingViews.Item(1).ReferencedDocumentDescriptor.ReferencedDocument.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then&lt;BR /&gt; Try&lt;BR /&gt; 'oDoc.SaveAs(ThisDoc.FileName &amp;amp; ".dxf", True)&lt;BR /&gt; ' Get the DXF translator Add-In.&lt;BR /&gt; Dim DXFAddIn As TranslatorAddIn&lt;BR /&gt; DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")&lt;BR /&gt; 'Set a reference to the active document (the document to be published).&lt;BR /&gt; Dim oDocument As Document&lt;BR /&gt; oDocument = ThisDoc.Document&lt;BR /&gt; Dim oContext As TranslationContext&lt;BR /&gt; oContext = ThisApplication.TransientObjects.CreateTranslationContext&lt;BR /&gt; oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism&lt;BR /&gt; ' Create a NameValueMap object&lt;BR /&gt; Dim oOptions As NameValueMap&lt;BR /&gt; oOptions = ThisApplication.TransientObjects.CreateNameValueMap&lt;BR /&gt; ' Create a DataMedium object&lt;BR /&gt; Dim oDataMedium As DataMedium&lt;BR /&gt; oDataMedium = ThisApplication.TransientObjects.CreateDataMedium&lt;BR /&gt; ' Check whether the translator has 'SaveCopyAs' options&lt;BR /&gt; If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then&lt;BR /&gt; Dim strIniFile As String&lt;BR /&gt; strIniFile = "dxfout.ini"&lt;BR /&gt; ' Create the name-value that specifies the ini file to use.&lt;BR /&gt; oOptions.Value("Export_Acad_IniFile") = strIniFile&lt;BR /&gt; End If&lt;BR /&gt; 'Set the destination file name&lt;BR /&gt; oDataMedium.FileName = ThisDoc.PathAndFileName(False) &amp;amp; ".dxf"&lt;BR /&gt; MsgBox(oDataMedium.FileName)&lt;BR /&gt; 'Publish document.&lt;BR /&gt; DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)&lt;BR /&gt; &lt;BR /&gt; Catch&lt;BR /&gt; MsgBox("Error saving file",vbOKOnly,"Error")&lt;BR /&gt; Exit Sub&lt;BR /&gt; End Try&lt;BR /&gt; End If&lt;BR /&gt; Catch&lt;BR /&gt; 'MsgBox("Error detecting file type - probably no views on sheet: " &amp;amp; oSheet.Name,vbOKOnly,"Error")&lt;BR /&gt; End Try&lt;BR /&gt;Next&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Feb 2015 13:47:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-18T13:47:09Z</dc:date>
  </channel>
</rss>

