Search code examples
autodesk-forgeautodesk-designautomation

How to handle AutoCAD Mechanical files on Design Automation API


Please tell me how to omit "Auditing Mechanical Data" process or call correct commands after auditing.
I'm evaluating autocad addon program on Design automation API. My addon works correct for Autocad dwg, but It doesn't work for ACM dwg . (Please refer below logs.)

[01/08/2019 05:55:44] Version Number: O.47.Z.27 (UNICODE)
[01/08/2019 05:55:45] Xref "DRIVE_SHAFT": C:\Users\Admin\Desktop\Mechanical 
Structure\DRIVE_SHAFT.dwg
[01/08/2019 05:55:45] "DRIVE_SHAFT" is unloaded.
[01/08/2019 05:55:45] Xref "BOTTOM PLATE": C:\Users\Admin\Desktop\Mechanical 
Structure\BOTTOM PLATE.dwg
[01/08/2019 05:55:45] "BOTTOM PLATE" is unloaded.
[01/08/2019 05:55:45] Xref "WHEEL CASING": C:\Users\Admin\Desktop\Mechanical 
Structure\WHEEL CASING.dwg
[01/08/2019 05:55:45] "WHEEL CASING" is unloaded.
[01/08/2019 05:55:45] Xref "PUMP COVER": C:\Users\Admin\Desktop\Mechanical 
Structure\PUMP COVER.dwg
[01/08/2019 05:55:45] "PUMP COVER" is unloaded.
[01/08/2019 05:55:45] Xref "PUMP WHEEL": C:\Users\Admin\Desktop\Mechanical 
Structure\PUMP WHEEL.dwg
[01/08/2019 05:55:45] "PUMP WHEEL" is unloaded.
[01/08/2019 05:55:45] Regenerating model.
[01/08/2019 05:55:46] Auditing Mechanical Data...
[01/08/2019 05:55:46] Number of errors found: 0    Number of errors fixed: 0
[01/08/2019 05:55:46] Auditing Mechanical Data complete.
[01/08/2019 05:56:46] Error: AutoCAD Core Console is shut down due to timeout.

Solution

  • Will this problem occur if testing with other drawings, or only happen with specific drawing? In addition, may I know the main job your addon does?

    I tried to test with simple test: one main dwg with two xref dwg. All of them are created inside AutoCAD Mechanical. I also added some Mechanical entities such as title block. Next, I created an activity with the script below:

     "Script": "PDFSHX 1 _layoutcreateviewport 1 xref u acadM-xref2 _tilemode 0 -export _pdf _all result.pdf\n"
    

    It opens the main dwg, unloads one xref because your log shows it looks your addon will unload some xrefs. Finally my script export the drawing to PDF.

    The workitem works well. The log is as below

    workitem log for operating AutoCAD Mechanical drawings

    So, the failure at your side would be a specific problem that is related with your addon or drawings. Could you provide more information such as the main workflow your addon does and demo drawings. Please email us at forge.help@autodesk.com if there are confidential information.