I've written an AutoCAD command in C#/.NET that finds a table in a DWG file and fills that table with some data. Then it publishes a PDF file from the DWG using code very similar to the code found here.
This command works fine on desktop AutoCAD no problem. In Forge Design Automation, it works fine except for DWG files that were generated by one of our other commands - for these files, we get "failedInstructions", and the job report contains this weird "Loading Mechanical modules" message that I never see when a job runs successfully. Here's a snippet of a sample report:
[09/16/2021 13:51:33] Version Number: R.47.Z.170 (UNICODE)
[09/16/2021 13:51:35] Loading Mechanical modules.....
[09/16/2021 13:51:37] Loader application completed
[09/16/2021 13:51:38] Regenerating layout.
[09/16/2021 13:51:38] Regenerating model.
[09/16/2021 13:51:39] ERROR: Something went wrong. ErrorStatus=53.
Now, if I take that same input DWG file, load it up in AutoCAD desktop and save it manually, then use that version of the file as input to my Forge Design Automation job, it succeeds. And I don't get that "Loading Mechanical Modules" message in the report:
[09/16/2021 14:40:46] Version Number: R.47.Z.170 (UNICODE)
[09/16/2021 14:40:47] Regenerating layout.
[09/16/2021 14:40:47] Regenerating model.
[09/16/2021 14:40:48] AutoCAD menu utilities loaded.
[09/16/2021 14:40:48] Command:
[09/16/2021 14:40:48] Command:
[09/16/2021 14:40:48] Command:
[09/16/2021 14:40:48] Command: (command "SETTITLEBLOCKPARAMETERS")
Furthermore, I don't think this is necessarily a problem with my code, because I can reproduce this behavior with Autodesk's standard "AutoCAD.PlotToPDF+prod" activity. In other words, a given DWG file that fails in my activity also fails in "AutoCAD.PlotToPDF+prod", and a DWG file that succeeds in one also succeeds in the other.
Does anyone know what this "Loading Mechanical modules" message means, and why a given Design Automation (AutoCAD) activity might only succeed with a DWG file that has been saved manually in AutoCAD desktop but not a DWG file that was generated automatically from a template (DWT) by another Design Automation activity?
EDIT: Here's a sample DWG file that, when used as an input to the standard "AutoCAD.PlotToPDF+prod" design automation activity, results in the Error 53 (along with the "Loading mechanical modules" message): https://drive.google.com/file/d/1_vKqg_Ies4SUqT08tET-zSK-NESHcPby/view?usp=sharing