<?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 to ask YES or No for .DXF export when saving .IDW in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398221#M130650</link>
    <description>&lt;P&gt;I was able to get the filename working correctly. Now my only issue is that is is NOT automatically overwriting existing files. Everything I've ready said the SaveCopyAs function should overwrite without prompting. Any way to force the overwrite from my code?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2013 20:10:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-04T20:10:44Z</dc:date>
    <item>
      <title>iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939068#M130639</link>
      <description>&lt;P&gt;&lt;IMG align="middle" title="dontalways.png" src="https://forums.autodesk.com/t5/image/serverpage/image-id/53210iF9885C1405A5E9DF/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="dontalways.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Haha, little monday morning humour,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would like help with a simple rule if anyone has a few moments,&lt;/P&gt;&lt;P&gt;Basically, some of my drawings require a dxf for cnc purposes.&lt;BR /&gt;Not all my drawings, so I don't need a dxf for every drawing, just some.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be much quicker to have a rule that prompts a message box after I press save, stating something like&lt;/P&gt;&lt;P&gt;Do you require a .DXF?&lt;/P&gt;&lt;P&gt;&amp;nbsp;Yes&amp;nbsp;&amp;nbsp;&amp;nbsp; or&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have a rule that saves all my .idw's as pdf, I am not sure if I should have a separate rule or if it can be part of the same rule. The pdf rule is triggered by a save as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Save PDF with options
path_and_namePDF = ThisDoc.PathAndFileName(False) ' without extension
PDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oDocument = ThisApplication.ActiveDocument
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

If PDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then
'oOptions.Value("All_Color_AS_Black") = 0
oOptions.Value("Remove_Line_Weights") = 1
oOptions.Value("Vector_Resolution") = 400
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
'oOptions.Value("Custom_Begin_Sheet") = 2
'oOptions.Value("Custom_End_Sheet") = 4
End If

'Set the destination file name
oDataMedium.FileName = path_and_namePDF &amp;amp; ".pdf"

On Error Goto handlePDFLock
'Publish document.
Call PDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)

Exit Sub

handlePDFLock:
MessageBox.Show("PDF could not be saved, most likely someone else has it open.", _
"No PDF for you " &amp;amp; ThisApplication.GeneralOptions.UserName &amp;amp; "!")
Resume Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any input!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2013 14:00:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939068#M130639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-27T14:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939092#M130640</link>
      <description>&lt;P&gt;I searched this forum and came up with no results for any rules for exporting a dxf. I just did a google search and it found a post from this forum! the same search was done??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh well, here is the old &lt;A href="https://forums.autodesk.com/t5/Autodesk-Inventor/Execute-iLogic-Rule-Called-quot-ExportDXF-quot-from-VBA/td-p/2951078" target="_self"&gt;post&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;They have the following iLogic Rule for exporting to dxf, I have a questioin though, the OP states he has the rule set up to save to specific folder, I would like to save the dxf to the same directory as the .idw. Also i see in the rule he is referencing to an .ini file. What is that .ini file for and do I need it for my application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks (rule below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

' Sets directory for file save
Dim DXFDirectory As String
DXFDirectory = "\\ServerName\Shared\DXF Folder\"
' Sets save name as iProperties value
Dim SaveName As String
SaveName = iProperties.Value("Project", "Part Number")

If Len(Dir(DXFDirectory, vbDirectory)) = 0 Then
	MkDir (DXFDirectory)
End If

' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "\\HMI-ENGINEERING\Inventor_Data\Miscellaneous\dxf.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If
'Set the destination file name
oDataMedium.FileName = ThisDoc.PathAndFileName(False) 
oDataMedium.FileName = DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf"
'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with
i = MessageBox.Show("Preview the DXF file?", "DXF Preview",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
If i = vbYes Then ThisDoc.Launch(oDataMedium.FileName)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2013 14:52:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939092#M130640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-27T14:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939169#M130641</link>
      <description>&lt;P&gt;Update: the code below now produces a .dxf when I save a drawing.&lt;/P&gt;&lt;P&gt;It uses the same name and places it in the same directory,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final step I would like, is once I press save on the drawing, I would like a message box to pop up asking if a .dxf export is required, if yes then run the rule, if no then just save document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will continue to play around with this tonight and post back if I can find a solution!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;' Get the DXF translator Add-In.
path_and_nameDXF = ThisDoc.PathAndFileName(False)
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument

Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "\\TESSBSRV\Personal\sfarr\Documents\CAD_Documents\DXF_Export_INI\DXF_Export.ini"
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If

oDataMedium.FileName = path_and_nameDXF &amp;amp; ".dxf"

Call DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2013 19:02:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939169#M130641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-27T19:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939285#M130642</link>
      <description>&lt;P&gt;Victory!&lt;/P&gt;&lt;P&gt;I used this reference to complete my rule, works great now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.ca/2011/03/using-yes-no-message-box-in-your-ilogic.html" target="_blank"&gt;http://inventortrenches.blogspot.ca/2011/03/using-yes-no-message-box-in-your-ilogic.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a rule that I have triggered by a save, once the drawing is saved a message box prompts asking if a .dxf is needed, yes or no. if yes is selected, the drawing will have a copy exported as .dxf with same name and location as .idw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps someone!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;PRE&gt;'query user

question = MessageBox.Show("is a .DXF Export Required", "iLogic Question",MessageBoxButtons.YesNo,MessageBoxIcon.Question)

          'set condition based on answer
            If question = vbYes Then
			
' Get the DXF translator Add-In.
path_and_nameDXF = ThisDoc.PathAndFileName(False)
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument

Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "C:\Users\Farr\Documents\Inventor\DXF_EXPORT_INI\DXF_EXPORT.ini"
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If

oDataMedium.FileName = path_and_nameDXF &amp;amp; ".dxf"

Call DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
End If &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2013 21:36:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3939285#M130642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-27T21:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3949837#M130643</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;code working perfect, but my first&amp;nbsp;questionwould be:&amp;nbsp;is it possible to run dxf for each sheet with sheet name. Second question is it possible to make dxf for each sheet but with option which sheet to be included in dxf formation&lt;/P&gt;&lt;P&gt;This second option would be just perfect time saver for me.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2013 15:29:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3949837#M130643</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2013-06-07T15:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3949860#M130644</link>
      <description>&lt;P&gt;I am going to say yes, you can bring up the same type dialogue to export specific sheets to dxf, however I am not a power iLogic user. Since I marked this thread solved, you may want to create a new thread/post and reference this one to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I typically never use multiple sheets, forget why exactly, but I find it much easier to just adjust the size of sheet if i need more room. Also any logic used becomes more difficult to write for this reason as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2013 15:40:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/3949860#M130644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-07T15:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4303654#M130645</link>
      <description>&lt;P&gt;Ok thanks for reply. I took from your code most of that but still need to figureout some stuff. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 20:42:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4303654#M130645</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2013-06-19T20:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398167#M130648</link>
      <description>&lt;P&gt;I took the code from this thread and customized it a little (to our paths, etc.) and came up with a few issues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file name ends up being PartNumberPartNumber.dxf (using the actual part number). If I change the line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oDataMedium.FileName = DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;to&lt;/P&gt;&lt;PRE&gt;oDataMedium.FileName = SaveName &amp;amp; ".dxf"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;it cries at me. Where is it getting the part number twice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, let's say I have a 2-sheet drawing. It creates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Partnumber.dxf&lt;/P&gt;&lt;P&gt;Partnumber_SHEET_1.dxf&lt;/P&gt;&lt;P&gt;Partnumber_SHEET_2.dxf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do a manual Save Copy As&amp;gt;DXF, it creates the two "SHEET" files, but not the first one. That's the behavior I'd like to see.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, this doesn't happen on a single sheet drawing, but if the files already exist, it brings up a dialogue EVERY TIME to overwrite existing files. How can I force it to overwrite with no prompt?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

' Sets directory for file save
Dim DXFDirectory As String
DXFDirectory = strFolder
' Sets save name as iProperties value
Dim SaveName As String
SaveName = iProperties.Value("Project", "Part Number")

' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "\\server\Company Engineering Documents\Inventor 2013 Files\Save Templates\DXF Export.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If
'Set the destination file name
oDataMedium.FileName = ThisDoc.PathAndFileName(False) 
oDataMedium.FileName = DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf"
'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with
i = MessageBox.Show("Preview the DXF file?", "DXF Preview",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
If i = vbYes Then ThisDoc.Launch(oDataMedium.FileName)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Never mind the "strFolder" variable. I set it above the code.)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 19:53:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398167#M130648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T19:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398193#M130649</link>
      <description>&lt;P&gt;'This is good rule change for your purpose path and folder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;!-- EndFragment --&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;oPath &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisDoc&lt;/STRONG&gt;.&lt;STRONG&gt;Path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oFileName &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisDoc&lt;/STRONG&gt;.&lt;STRONG&gt;FileName&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;False&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;EM&gt;'without extension&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDXFAddIn &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.ApplicationAddIns.ItemById&lt;STRONG&gt;(&lt;/STRONG&gt;"{C24E3AC4-122E-11D5-8E91-0010B541CD80}"&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDocument &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.ActiveDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oContext &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.TransientObjects.CreateTranslationContext&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oContext.Type &lt;STRONG&gt;=&lt;/STRONG&gt; IOMechanismEnum.kFileBrowseIOMechanism&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oOptions &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.TransientObjects.CreateNameValueMap&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDataMedium &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.TransientObjects.CreateDataMedium&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'Define the drawing &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; oDrawing &lt;STRONG&gt;As&lt;/STRONG&gt; DrawingDocument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDrawing &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;ThisDoc&lt;/STRONG&gt;.&lt;STRONG&gt;Document&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; oSheet &lt;STRONG&gt;As&lt;/STRONG&gt; Sheet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; lPos &lt;STRONG&gt;As&lt;/STRONG&gt; &lt;STRONG&gt;Long&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; rPos &lt;STRONG&gt;As&lt;/STRONG&gt; &lt;STRONG&gt;Long&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; sLen &lt;STRONG&gt;As&lt;/STRONG&gt; &lt;STRONG&gt;Long&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; sSheetName &lt;STRONG&gt;As&lt;/STRONG&gt; &lt;STRONG&gt;String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Dim&lt;/STRONG&gt; sSheetNumber &lt;STRONG&gt;As&lt;/STRONG&gt; &lt;STRONG&gt;Integer&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'step through each drawing sheet&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim&lt;/STRONG&gt; Response &lt;STRONG&gt;As&lt;/STRONG&gt; MsgboxResult&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;For&lt;/STRONG&gt; &lt;STRONG&gt;Each&lt;/STRONG&gt; oSheet &lt;STRONG&gt;In&lt;/STRONG&gt; oDrawing.Sheets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;MsgBox&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;"Yes = Save or No = Continue to next Sheet?", MsgBoxStyle.YesNo, "Question"&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;If&lt;/STRONG&gt; Response &lt;STRONG&gt;=&lt;/STRONG&gt; MsgBoxResult.Yes &lt;STRONG&gt;Then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'find the seperator in the sheet name:number&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lPos &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;InStr&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;oSheet.&lt;STRONG&gt;Name&lt;/STRONG&gt;, ":"&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'find the number of characters in the sheet name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sLen &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;Len&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;oSheet.&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'find the sheet name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sSheetName &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;Left&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;oSheet.&lt;STRONG&gt;Name&lt;/STRONG&gt;, lPos &lt;STRONG&gt;-&lt;/STRONG&gt; &lt;STRONG&gt;1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'find the sheet number&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sSheetNumber &lt;STRONG&gt;=&lt;/STRONG&gt; &lt;STRONG&gt;Right&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;oSheet.&lt;STRONG&gt;Name&lt;/STRONG&gt;, sLen &lt;STRONG&gt;-&lt;/STRONG&gt; lPos&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'get DXF target folder path&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oFolder &lt;STRONG&gt;=&lt;/STRONG&gt; "C:\Test Folder"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'Set the DXF target file name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDataMedium.&lt;STRONG&gt;FileName&lt;/STRONG&gt; &lt;STRONG&gt;=&lt;/STRONG&gt; oFolder &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; "\" &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; " " &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; sSheetName &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; " " &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; sSheetNumber &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; ".dxf"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;MessageBox&lt;/STRONG&gt;.&lt;STRONG&gt;Show&lt;/STRONG&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;"DXF SAVED TO: " &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; oDataMedium.&lt;STRONG&gt;FileName&lt;/STRONG&gt;, "DXF Saved", MessageBoxButtons.OK&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;'Publish document&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oDXFAddIn.SaveCopyAs&lt;STRONG&gt;(&lt;/STRONG&gt;oDocument, oContext, oOptions, oDataMedium&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;End&lt;/STRONG&gt; &lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 20:02:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398193#M130649</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2013-09-04T20:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398221#M130650</link>
      <description>&lt;P&gt;I was able to get the filename working correctly. Now my only issue is that is is NOT automatically overwriting existing files. Everything I've ready said the SaveCopyAs function should overwrite without prompting. Any way to force the overwrite from my code?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 20:10:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398221#M130650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T20:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398339#M130651</link>
      <description>&lt;P&gt;My problem with overwriting doesn't exist when there is only a single sheet. The problem is when there are 2 or more sheets. Inventor automatically (somehow, somewhere) appends the "_SHEET_X" to the end of each sheet when creating the DXFs. That's fine for new files but it apparently can't overwrite those without my input. Is there a way to either force that overwrite OR delete the files (could be x number of sheets) right before the .SaveCopyAs() function?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 20:56:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398339#M130651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T20:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398373#M130652</link>
      <description>&lt;P&gt;With this rule i gave you i do not have no problem.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 21:18:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398373#M130652</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2013-09-04T21:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398447#M130653</link>
      <description>Still the same issue. If the DXF already exists, it brings up the "save copy as" dialogue and warns me about saving over it...</description>
      <pubDate>Wed, 04 Sep 2013 22:02:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398447#M130653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T22:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398519#M130654</link>
      <description>&lt;P&gt;Here's what I ended up with and it works perfectly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'query user

question = MessageBox.Show("is a .DXF Export Required?" &amp;amp; vbNewLine &amp;amp; "WARNING: This operation will overwrite existing DXF files!", "Export to DXF",MessageBoxButtons.YesNo,MessageBoxIcon.Question)

          'set condition based on answer
            If question = vbYes Then


'Bunch of IF statements here to set strFolder to the path I want the particular DXF saved in, based off the name of the drawing file


' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

' Sets directory for file save
Dim DXFDirectory As String
DXFDirectory = strFolder
' Sets save name as iProperties value
Dim SaveName As String
SaveName = iProperties.Value("Project", "Part Number")

' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "\\server\Company Engineering Documents\Inventor 2013 Files\Save Templates\DXF Export.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If
'Set the destination file name
oDataMedium.FileName = ThisDoc.PathAndFileName(False) 
oDataMedium.FileName = DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf"

If ThisDoc.Document.Sheets.Count &amp;gt; 1 Then
	For sheet_count = 1 To ThisDoc.Document.Sheets.Count
		If Len(Dir(DXFDirectory &amp;amp; SaveName &amp;amp; "_SHEET_" &amp;amp; sheet_count &amp;amp; ".dxf")) &amp;lt;&amp;gt; 0 Then
			Kill(DXFDirectory &amp;amp; SaveName &amp;amp; "_SHEET_" &amp;amp; sheet_count &amp;amp; ".dxf")
		Else If Len(Dir(DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf")) &amp;lt;&amp;gt; 0 Then
			Kill(DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf")
		End If
	Next sheet_count
End If

'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with
'i = MessageBox.Show("Preview the DXF file? " &amp;amp; SaveName &amp;amp; " " &amp;amp; ThisDoc.Document.Sheets.Count, "DXF Preview",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
'If i = vbYes Then ThisDoc.Launch(oDataMedium.FileName)
End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 22:52:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4398519#M130654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T22:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4399181#M130655</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;When you run&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a rule&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I have some&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;error messages&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rule Compile Errors in Eksport DXF, in eksport DXF.idw&lt;/P&gt;&lt;P&gt;Error on Line 3 : &lt;SPAN class="hps"&gt;Element&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Questi&lt;/SPAN&gt;&lt;SPAN&gt;" is not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a member of the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;element&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Tahoma" size="1"&gt;&lt;FONT face="Tahoma" size="1"&gt;„System.Windows.Forms.MessageBoxIcon”.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Error on Line 3 : &lt;SPAN class="hps"&gt;Expected&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;comma&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;character&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;" and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;follow&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the correct&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Error on Line 19 : &lt;SPAN class="hps"&gt;Expected end of statement&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Error on Line 23 : &lt;SPAN class="hps"&gt;Expected end of statement&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;How to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;solve these problems&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;KSwietochowski&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2013 08:30:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4399181#M130655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-05T08:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4400491#M130656</link>
      <description>Can you post your code?</description>
      <pubDate>Thu, 05 Sep 2013 13:01:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4400491#M130656</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-05T13:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4400503#M130657</link>
      <description>&lt;P&gt;I did yesterday. Go to first page.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2013 13:03:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4400503#M130657</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2013-09-05T13:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4400599#M130658</link>
      <description>&lt;P&gt;Not you,&amp;nbsp;&lt;SPAN&gt;KSwietochowski who was having the issue&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2013 13:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4400599#M130658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-05T13:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4409775#M130659</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The code has been&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;completely&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;copied from&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;your post&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;!--  StartFragment  --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;!--  EndFragment  --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;'query user&lt;BR /&gt;&lt;BR /&gt;question = MessageBox.Show("is a .DXF Export Required?" &amp;amp; vbNewLine &amp;amp; "WARNING: This operation will overwrite existing DXF files!", "Export to DXF",MessageBoxButtons.YesNo,MessageBoxIcon.Question)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'set condition based on answer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If question = vbYes Then&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;'Bunch of IF statements here to set strFolder to the path I want the particular DXF saved in, based off the name of the drawing file&lt;BR /&gt;&lt;BR /&gt;&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 = ThisApplication.ActiveDocument&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;&lt;BR /&gt;' Sets directory for file save&lt;BR /&gt;Dim DXFDirectory As String&lt;BR /&gt;DXFDirectory = strFolder&lt;BR /&gt;' Sets save name as iProperties value&lt;BR /&gt;Dim SaveName As String&lt;BR /&gt;SaveName = iProperties.Value("Project", "Part Number")&lt;BR /&gt;&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 = "\\server\Company Engineering Documents\Inventor 2013 Files\Save Templates\DXF Export.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)&lt;BR /&gt;oDataMedium.FileName = DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf"&lt;BR /&gt;&lt;BR /&gt;If ThisDoc.Document.Sheets.Count &amp;gt; 1 Then&lt;BR /&gt;For sheet_count = 1 To ThisDoc.Document.Sheets.Count&lt;BR /&gt;If Len(Dir(DXFDirectory &amp;amp; SaveName &amp;amp; "_SHEET_" &amp;amp; sheet_count &amp;amp; ".dxf")) &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;Kill(DXFDirectory &amp;amp; SaveName &amp;amp; "_SHEET_" &amp;amp; sheet_count &amp;amp; ".dxf")&lt;BR /&gt;Else If Len(Dir(DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf")) &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;Kill(DXFDirectory &amp;amp; SaveName &amp;amp; ".dxf")&lt;BR /&gt;End If&lt;BR /&gt;Next sheet_count&lt;BR /&gt;End If&lt;BR /&gt;&lt;BR /&gt;'Publish document.&lt;BR /&gt;DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)&lt;BR /&gt;'Launch the dxf file in whatever application Windows is set to open this document type with&lt;BR /&gt;'i = MessageBox.Show("Preview the DXF file? " &amp;amp; SaveName &amp;amp; " " &amp;amp; ThisDoc.Document.Sheets.Count, "DXF Preview",MessageBoxButtons.YesNo,MessageBoxIcon.Question)&lt;BR /&gt;'If i = vbYes Then ThisDoc.Launch(oDataMedium.FileName)&lt;BR /&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;KSwietochowski&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2013 07:30:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4409775#M130659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-09T07:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to ask YES or No for .DXF export when saving .IDW</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4637747#M130660</link>
      <description>&lt;P&gt;Those errors are being flagged up because some unicode characters have been added when you use windows copy and paste command.&lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&lt;/P&gt;&lt;P&gt;If you copy the code from the forum into notepad, and then copy it from notepad into your new rule, you will find that these errors should not be flagged up. Hope this helps &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 16:48:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-ask-yes-or-no-for-dxf-export-when-saving-idw/m-p/4637747#M130660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-20T16:48:39Z</dc:date>
    </item>
  </channel>
</rss>

