Hello @Matteo_1987
I pursued investigations in this direction, but I'm afraid to not be able to help you in the context of Distributed Batch on this buisness need for the following reasons.
When starting from q drawing with multiple sheets:
- When using dxf_2d_export.ttdor dwg_2d_export.ttd in Distributed Batch, multiple files are produced (one per each sheet, and no config option or format enum entries in ttd files can be configured to avoid this)
- Save as DXF or DWG in Interactive sessions produce one single file with multiple sheets (aligned with what you're expecting)
- A mapkey can be recorder performing >File >Save as >DWG (or DXF), and, if name is NOT specified after "Save as" (just pressing OK with default name, before stopping to record the mapkey), then system is working as expected when mapkey is launched from other drawings (generating <drw_name>.dxg or dxf unique files per each drw - even if drw has multiple sheets - and <drw_name> being different in each drawing, the dwf/dwg files are not rewritten, still aligned with what you want)
- However, if configured in mapkey.ttd to be launched with Distributed Batch:
- Outcome says Complete in Distributed Batch UI (leading in assumption that expected DXF/DWG unique files were creted)
- BUT DXF/DWG FIles are NOT generated on disk
Searching in this direction, I identified (and rememberd, because already faced it in the past) about the limitation documented in article 207715
- This limitation prevents Distributed Btach to produce external objects (not defined in Input "Objects" field of the task).
- In other words, calling mapkey in Disrtibuted Batch is:
- Useful when intent is to modify existing objects affected by DBatch task, like in examples documented in article 109444
- But useless when intent is to produce objects not defined as "Input Objects" in the task (like export actions being matter of interest in this post)
Due to above limitation in the context of mapkey execution via DBatch, I'm afraid to not be able to provide additional guidance in Distributed Batch direction. Quicker way to produce what you would like is probably therefore to:
- Register a mapkey, similar to the one shown below
- Export dwg files from interactive session by retrieving drawings and running mapkey (manual action for each drawing)
- Alternatively, a trail file could be produced doing aboe steps, and then reworked on disk (in a text editor) by copying/pasting lines dedicated to the Open and Export process, and change name of objects to open in the reworked trail file
Example of Mapkey:
mapkey dwg_export @MAPKEY_LABELdwg_export;~ Close `main_dlg_cur` `appl_casc`;\
mapkey(continued) ~ Command `ProCmdModelSaveAs` ;~ Open `file_saveas` `type_option`;\
mapkey(continued) ~ Close `file_saveas` `type_option`;\
mapkey(continued) ~ Select `file_saveas` `type_option` 1 `db_560`;\
mapkey(continued) ~ Activate `file_saveas` `OK`;~ Activate `export_2d_dlg` `OK_Button`;
I'm sorry to not be able to help you more efficiently on this request,
Regards,
Serge