<?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: Flatpattern - Polyline - Info DWG in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/flatpattern-polyline-info-dwg/m-p/5932444#M60178</link>
    <description>&lt;P&gt;... no ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2015 11:13:40 GMT</pubDate>
    <dc:creator>martinhoos</dc:creator>
    <dc:date>2015-12-02T11:13:40Z</dc:date>
    <item>
      <title>Flatpattern - Polyline - Info DWG</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/flatpattern-polyline-info-dwg/m-p/5924052#M60091</link>
      <description>&lt;P&gt;Hello Forum,&lt;/P&gt;&lt;P&gt;the following code works pretty good, but there are&amp;nbsp;three problems;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first - the outercontour is not a polyline&lt;/P&gt;&lt;P&gt;second - the DWG file doesnt work (if i go by hand to the options, i can say take this DWG into the DXF, it has information in)&lt;/P&gt;&lt;P&gt;third - is there a solution to get only the upper face of the flat pattern into the dxf?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully, there is one in here who can help me...&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main
DefaultChoice = True
CadlinePathProperty()
Cadline()
End Sub
Sub CadlinePathProperty()
Dim FilePATH As String = "FilePATH"
Dim FileINDEX As String = "FileINDEX"
customPropertySet = ThisDoc.Document.PropertySets.Item _
("Inventor User Defined Properties")
Try
         prop= customPropertySet.Item(FilePATH)
Catch
            customPropertySet.Add("", FilePATH)
End Try
customPropertySet = ThisDoc.Document.PropertySets.Item _
("Inventor User Defined Properties")
Try
         prop= customPropertySet.Item(FileINDEX)
Catch
            customPropertySet.Add("", FileINDEX)
End Try
If iProperties.Value("Custom", "FilePATH") = "" Then
iProperties.Value("Custom", "FilePATH") = "u:\trans\"
Else
End If
Dim partDoc As PartDocument
If ThisApplication.ActiveDocument.DocumentType &amp;lt;&amp;gt; kPartDocumentObject Then
MessageBox.Show ("Please open a part document", "iLogic")
End If
'FilePATH = InputBox("Enter a FilePATH for part file", "iLogic", iProperties.Value("Custom", "FilePATH"))
'iProperties.Value("Custom", "FilePATH") = FilePATH
FileINDEX = InputBox("Bitte Änderungs-Index eingeben, z.B. A00", "iLogic", iProperties.Value("Custom", "FileINDEX"))
iProperties.Value("Custom", "FileINDEX") = FileINDEX
End Sub
Public Sub Cadline()
    Dim oDoc As PartDocument
    oDoc = ThisApplication.ActiveDocument
    Dim oCompDef As SheetMetalComponentDefinition
    oCompDef = oDoc.ComponentDefinition
     If oCompDef.HasFlatPattern = False Then
     oCompDef.Unfold
    Else
    oCompDef.FlatPattern.Edit
    End If
    Dim sOut As String
    Dim sPATH As String
    sPATH = iProperties.Value("Custom", "FilePATH")
	Dim sINDEX As String
    sINDEX = iProperties.Value("Custom", "FileINDEX")
	sOut = "FLAT PATTERN DXF?AcadVersion=2000" _
			+ "&amp;amp;OuterProfileLayer=0" _
			+ "&amp;amp;IV_FEATURE_PROFILES=" _
			+ "&amp;amp;IV_INTERIOR_PROFILES=" _
			+ "&amp;amp;InvisibleLayers=IV_UNCONSUMEND_SKETCHES;IV_ALTREP_BACK;IV_ALTREP_FRONT;IV_ARC_CENTERS;IV_TOOL_CENTER_DOWN;IV_TOOL_CENTER;IV_ARC_CENTERS;IV_TANGENT;IV_BEND;IV_FEATURE_PROFILES_DOWN;IV_BEND_DOWN" _
			+ "&amp;amp;SplineTolerance Double 0.01" _
			+ "&amp;amp;MergeProfilesIntoPolyline=TRUE" _
			+ "&amp;amp;MergeOuterContour=TRUE" _
			+ "&amp;amp;AUTOCADTEMPLATE=I:\DXF\hinweis_dxfout.dwg" _
			+ "&amp;amp;MODELGEOMETRYONLY=Yes"	  
	Dim sFname As String
    sFname = sPATH &amp;amp; "\" &amp;amp; ThisDoc.FileName(False) &amp;amp; "-" &amp;amp; sINDEX &amp;amp; ".dxf"
    MessageBox.Show("DXF SAVED TO: " &amp;amp; sFname ,"DXF Saved", MessageBoxButtons.OK)
    oCompDef.DataIO.WriteDataToFile( sOut, sFname)
  oDoc = ThisApplication.ActiveDocument
Dim oSMDef As SheetMetalComponentDefinition
oSMDef = oDoc.ComponentDefinition
oSMDef.FlatPattern.ExitEdit
'This code has been adapted from http://www.cadlinecommunity.co.uk/Blogs/Blog.aspx?ScoId=
'4733ef2d-cd48-4bd9-a280-1d88dbbf3556&amp;amp;returnTo=%2fBlogs%2fclintonbrown%2fDefault.aspx
'&amp;amp;returnTitle=Clinton+Brown%20Blog
End Sub

 &lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Nov 2015 07:53:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/flatpattern-polyline-info-dwg/m-p/5924052#M60091</guid>
      <dc:creator>martinhoos</dc:creator>
      <dc:date>2015-11-25T07:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Flatpattern - Polyline - Info DWG</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/flatpattern-polyline-info-dwg/m-p/5932444#M60178</link>
      <description>&lt;P&gt;... no ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 11:13:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/flatpattern-polyline-info-dwg/m-p/5932444#M60178</guid>
      <dc:creator>martinhoos</dc:creator>
      <dc:date>2015-12-02T11:13:40Z</dc:date>
    </item>
  </channel>
</rss>

