<?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 for exporting .dxf as polylines - Share, anyone? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13325464#M2386</link>
    <description>&lt;P&gt;Most of what you just said is foreign language to me. I don't know anything about coding terms.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you mind breaking down what you just said in laymans terms? Step by step instructions would be even better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not a very advanced inventor user, I just do the basics for the most part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I checked and I don't have a DXF translator add in&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 13:01:57 GMT</pubDate>
    <dc:creator>EagleBee93</dc:creator>
    <dc:date>2025-02-18T13:01:57Z</dc:date>
    <item>
      <title>iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13311178#M2380</link>
      <description>&lt;P&gt;I've been working with ChatGPT for the past hour trying (for the first time ever!) to write an iLogic script that does the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Save Copy As &amp;gt; .DXF (from a .DWG file)&lt;/P&gt;&lt;P&gt;Let's me select each sheet that i want to export (each sheet has multiple base views of different CNC parts)&lt;/P&gt;&lt;P&gt;Exports each sheet as one .dxf file (does this for all sheets selected)&lt;/P&gt;&lt;P&gt;Converts all&amp;nbsp; linework to polylines&lt;/P&gt;&lt;P&gt;Prompts me for location of where i want to save the file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get it just right, and the one time it did work it took literally 30 seconds to export each sheet, even sheets with just one base view. does anyone have a similar script theyd be willing to share?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 21:56:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13311178#M2380</guid>
      <dc:creator>EagleBee93</dc:creator>
      <dc:date>2025-02-10T21:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13311894#M2381</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13486555"&gt;@EagleBee93&lt;/a&gt;&amp;nbsp;.&amp;nbsp;You need to set the MergeProfilesIntoPolyline = True setting in the &lt;A title="help.autodesk.com" href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-451B918E-9374-442D-B9AE-31A8C83674B7" target="_blank" rel="noopener"&gt;DXF file export properties&lt;/A&gt;. Code example:&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim sOut As String = "FLAT PATTERN DXF?AcadVersion=2018&amp;amp;MergeProfilesIntoPolyline=True"&lt;/LI-CODE&gt;
&lt;P&gt;To have a better chance of helping you, I need you to share your code sample.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 07:46:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13311894#M2381</guid>
      <dc:creator>Andrii_Humeniuk</dc:creator>
      <dc:date>2025-02-11T07:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13312489#M2382</link>
      <description>&lt;P&gt;Imports System.Windows.Forms&lt;/P&gt;&lt;P&gt;Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument&lt;BR /&gt;Dim oSheets As Sheets = oDoc.Sheets&lt;BR /&gt;Dim selectedSheets As New List(Of String)&lt;/P&gt;&lt;P&gt;' Create a form to select sheets&lt;BR /&gt;Dim form As New Form()&lt;BR /&gt;form.Text = "Select Sheets to Export"&lt;BR /&gt;form.Width = 500&lt;BR /&gt;form.Height = 600&lt;BR /&gt;form.FormBorderStyle = FormBorderStyle.FixedDialog&lt;BR /&gt;form.StartPosition = FormStartPosition.CenterScreen&lt;/P&gt;&lt;P&gt;' Create a panel for scrolling&lt;BR /&gt;Dim panel As New Panel()&lt;BR /&gt;panel.AutoScroll = True&lt;BR /&gt;panel.Dock = DockStyle.Top&lt;BR /&gt;panel.Height = 450&lt;BR /&gt;form.Controls.Add(panel)&lt;/P&gt;&lt;P&gt;Dim checkBoxes As New List(Of CheckBox)&lt;BR /&gt;Dim yPosition As Integer = 10&lt;/P&gt;&lt;P&gt;' Add checkboxes for each sheet&lt;BR /&gt;For Each oSheet As Sheet In oSheets&lt;BR /&gt;Dim checkBox As New CheckBox()&lt;BR /&gt;checkBox.Text = oSheet.Name&lt;BR /&gt;checkBox.AutoSize = True&lt;BR /&gt;checkBox.Top = yPosition&lt;BR /&gt;checkBox.Left = 10&lt;BR /&gt;checkBoxes.Add(checkBox)&lt;BR /&gt;panel.Controls.Add(checkBox)&lt;BR /&gt;yPosition += 25&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;' Export button&lt;BR /&gt;Dim confirmButton As New Button()&lt;BR /&gt;confirmButton.Text = "Export Selected"&lt;BR /&gt;confirmButton.Top = yPosition + 20&lt;BR /&gt;confirmButton.Left = 10&lt;BR /&gt;confirmButton.Width = 150&lt;BR /&gt;form.Controls.Add(confirmButton)&lt;/P&gt;&lt;P&gt;' Event handler for button click&lt;BR /&gt;AddHandler confirmButton.Click, Sub(sender As Object, e As EventArgs)&lt;BR /&gt;For Each checkBox As CheckBox In checkBoxes&lt;BR /&gt;If checkBox.Checked Then&lt;BR /&gt;selectedSheets.Add(checkBox.Text)&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;BR /&gt;form.Close()&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;' Show the form&lt;BR /&gt;form.ShowDialog()&lt;/P&gt;&lt;P&gt;' Check if any sheets were selected&lt;BR /&gt;If selectedSheets.Count = 0 Then&lt;BR /&gt;MessageBox.Show("No sheets selected for export.", "Export Canceled")&lt;BR /&gt;Exit Sub&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;' Ask user for save location&lt;BR /&gt;Dim oFileDialog As New SaveFileDialog()&lt;BR /&gt;oFileDialog.Filter = "DXF Files (*.dxf)|*.dxf"&lt;BR /&gt;oFileDialog.Title = "Select DXF Save Location"&lt;/P&gt;&lt;P&gt;If oFileDialog.ShowDialog() = DialogResult.OK Then&lt;BR /&gt;Dim savePath As String = System.IO.Path.GetDirectoryName(oFileDialog.FileName)&lt;/P&gt;&lt;P&gt;' Export each selected sheet&lt;BR /&gt;For Each sheetName In selectedSheets&lt;BR /&gt;Try&lt;BR /&gt;Dim oSheet As Sheet = oSheets.Item(sheetName)&lt;BR /&gt;Dim safeSheetName As String = System.Text.RegularExpressions.Regex.Replace(oSheet.Name, "[^\w\.-]", "_")&lt;BR /&gt;Dim fullFileName As String = System.IO.Path.Combine(savePath, safeSheetName &amp;amp; ".dxf")&lt;/P&gt;&lt;P&gt;' Export the sheet&lt;BR /&gt;oSheet.SaveAs(fullFileName, SaveCopyAsOptionsEnum.kDXFFormat)&lt;BR /&gt;MessageBox.Show("DXF Exported: " &amp;amp; fullFileName, "Export Complete")&lt;BR /&gt;Catch ex As Exception&lt;BR /&gt;MessageBox.Show("Error exporting DXF for sheet " &amp;amp; sheetName &amp;amp; ": " &amp;amp; ex.Message, "Export Failed")&lt;BR /&gt;End Try&lt;BR /&gt;Next&lt;BR /&gt;Else&lt;BR /&gt;MessageBox.Show("DXF export canceled.", "Export Canceled")&lt;BR /&gt;End If&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;I had a better working version but I went through probably 25 different versions trying to get ChatGPT to fix all the mistakes, so this is the best one I could find. It still has an error code for that "savecopyasoptionsenum" but I don't understand much of this coding jargon. So, I'm lost haha.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 13:52:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13312489#M2382</guid>
      <dc:creator>EagleBee93</dc:creator>
      <dc:date>2025-02-11T13:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13314508#M2383</link>
      <description>&lt;P&gt;This would be great rule if is possible to fix. I uncomment line 80 and run rule. No error but file is not saved. Experts can you dig into little bit. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 11:45:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13314508#M2383</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2025-02-12T11:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13317964#M2384</link>
      <description>&lt;P&gt;ANYBODY TO TRY?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 18:57:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13317964#M2384</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2025-02-13T18:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13318157#M2385</link>
      <description>&lt;P&gt;Can't fix that ball of&amp;nbsp;spaghetti code.&lt;/P&gt;&lt;P&gt;This is dxf export VB code:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=SaveAsDXFTranslator_Sample" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=SaveAsDXFTranslator_Sample&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick is to set option values.&lt;/P&gt;&lt;P&gt;Easiest way is do export manually.&amp;nbsp; Get the options correct and save the ini file.&lt;/P&gt;&lt;P&gt;Reuse that file in code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or get the correct options here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-25D24E28-7517-4903-8AEE-123F8C71A89E&amp;amp;v=Inventor2024" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-25D24E28-7517-4903-8AEE-123F8C71A89E&amp;amp;v=Inventor2024&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 20:42:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13318157#M2385</guid>
      <dc:creator>hollypapp65</dc:creator>
      <dc:date>2025-02-13T20:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic for exporting .dxf as polylines - Share, anyone?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13325464#M2386</link>
      <description>&lt;P&gt;Most of what you just said is foreign language to me. I don't know anything about coding terms.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you mind breaking down what you just said in laymans terms? Step by step instructions would be even better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not a very advanced inventor user, I just do the basics for the most part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I checked and I don't have a DXF translator add in&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 13:01:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-for-exporting-dxf-as-polylines-share-anyone/m-p/13325464#M2386</guid>
      <dc:creator>EagleBee93</dc:creator>
      <dc:date>2025-02-18T13:01:57Z</dc:date>
    </item>
  </channel>
</rss>

