Hi @czegledi_laszlo. If you are working with iParts, then I may not be the best at helping you with this task, because I have not used them in years, and am especially rusty at working with them by code. I am familiar with the basics, but not the detailed stuff. I know that once you have obtained the iPartFactory object by code, that will tell us where the 'member' documents will be stored when generated, but I am not familiar with iterating these members the right way.
But to help others a bit more, what is the exact name, including any capitalization, of the text type parameter you want to use in the DXF file's name.
Here is a little starter code I created that may help you and/or others along the way for now.
Sub Main
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kPartDocumentObject Then
MsgBox("A Part Document must be active for this rule to work. Exiting.", vbCritical, "")
Exit Sub
End If
Dim oPDoc As PartDocument = ThisDoc.Document
If oPDoc.SubType <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
MsgBox("This is not a Sheet Metal Part. Exiting rule.", vbCritical, "")
Exit Sub
End If
Dim iPFactory As iPartFactory = Nothing
If oPDoc.ComponentDefinition.IsiPartFactory Then
iPFactory = oPDoc.ComponentDefinition.iPartFactory
ElseIf oPDoc.ComponentDefinition.IsiPartMember Then
iPFactory = oPDoc.ComponentDefinition.iPartMember.ParentFactory
Else
MsgBox("This Part is not an iPart. Exiting rule.", vbCritical, "")
Exit Sub
End If
iPFactory.MemberEditScope = MemberEditScopeEnum.kEditActiveMember
Dim oMDir As String = iPFactory.MemberCacheDir
'gets an Array of Strings containing the full file names of all part files in that directory
Dim oExistingMemberFiles() As String = System.IO.Directory.GetFiles(oMDir, "*.ipt", System.IO.SearchOption.TopDirectoryOnly)
'we could now iterate through them and try to export them to DXF, if possible
' For Each oRow As iPartTableRow In iPFactory.TableRows
' Dim oMemberName As String = oRow.MemberName
' Dim oPartName As String = oRow.PartName 'corresponds to file name
' Next
End Sub
Wesley Crihfield

(Not an Autodesk Employee)