does this work for you?
Dim doc As PartDocument = ThisDoc.Document
If (doc.ComponentDefinition.IsiPartFactory = False) Then
MsgBox("This is not an iPart factory")
End If
Dim fact As iPartFactory = doc.ComponentDefinition.iPartFactory
For Each row As iPartTableRow In fact.TableRows
fact.DefaultRow = Row
doc.Update()
doc.Update2(False)
Dim oCompDef As SheetMetalComponentDefinition = doc.ComponentDefinition
If oCompDef.HasFlatPattern = False Then
oCompDef.Unfold()
Else
oCompDef.FlatPattern.Edit
End If
'DXF Settings
Dim sOut As String
sOut = "FLAT PATTERN DXF?AcadVersion=2000&OuterProfileLayer=IV_INTERIOR_PROFILES"
Dim sFname As String = "c:\temp\" & ThisDoc.FileName(False) & "_" & Row.MemberName & ".dxf"
'Export the DXF and fold the model back up
oCompDef.DataIO.WriteDataToFile(sOut, sFname)
oCompDef.FlatPattern.ExitEdit()
Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog: hjalte.nl - github.com