Hi @mac_wilkinson. The topic of exporting sheet metal flat patterns out to DXF has been a popular topic on this forum for many years, so if you do a search within this forum you will likely find tons of examples of either VBA macros, or iLogic rules for doing that general process. Some examples are dealing with iParts, but usually for exporting all 'members' of an iPartFactory, instead of the iPart member occurrences encountered within an assembly. I am not familiar with using iParts to represent sheet metal parts that I will later need to export flat pattern DXF's from, so not sure if there is a problem with that process or not. My guess is that the iPartFactory that all the members were generated from, must have had a FlatPattern already, before generating the members from it. Otherwise the individual members may not be able to generate their own FlatPattern after the fact, because that requires being able to edit the model, and we can not edit iPart member files. It seems to me that any iParts that we might encounter within an assembly, will be directly referencing an iPartMember model file, so I don't think anything special would be required to access their FlatPattern, as long as the FlatPattern already exists for them, and one does not need to be created.
Within the attached text file is some code for an example iLogic rule that you can play around with. The code is in two parts, but both parts can go into the same iLogic rule. The 'Main' part just gets the current document, and its referenced documents, defines a full path & name for the DXF file that should be created, and runs the other block of code on one of the documents involved. The second block of code is where most of the detailed stuff for the main job is defined. It is just using the most basic export options right now, because everyone has very different needs for the export options, and it can get very long and complex to customize that part of the code to meet someone else's wants/needs. You can refer to the following online help page for more details about that part of it, or refer to examples in other similar forum discussion examples. It is also set up to just create the DXF file in the same place as the model file, and with the same file name, but with the DXF file extension instead.
DataIO.WriteDataToFile
Wesley Crihfield

(Not an Autodesk Employee)