1

Per my meeting with Denis Grigor, I was informed that the the Design Automation API has the same capabilities as Model Derivative API to extract metadata from an uploaded AutoCAD file. Model Derivative has a fixed-job pricing structure which is more cost-effective for large files, since it's charged per job, whereas Design Automation is charged per processing hour.

My client will only be extracting data from smaller files, so it doesn't make sense to use Model Derivative API if Design Automation can do the same.

I don't know where to start however. Which specific APIs do I need to use if I want to upload an autocad file such as .dxf or .dwg and retrieve geometric results using Design Automation API?

J.E.C.
  • 2,616
  • 2
  • 18
  • 21

1 Answers1

1

Whether you are setting up a Design Automation pipeline for AutoCAD, Inventor, Revit, or any other "engine", the process is pretty much the same

  • develop and debug a plugin/script (in your case an AutoCAD plug-in) locally
  • upload the plugin/script to Design Automation service as an app bundle
  • create a Design Automation activity - a reusable template for tasks you will want to execute later, specifying the engine, app bundle, inputs, outputs, etc.
  • create a Design Automation work item, executing a task based on an activity with specific inputs/outputs (usually just URLs where input files can be downloaded from and output files uploaded to)

Here's a blog post with a simple example using Design Automation for Inventor - it takes an Inventor plugin that generates custom screenshots, and turns it into a Design Automation activity that is later executed with different input Inventor models: https://forge.autodesk.com/blog/simple-introduction-design-automation-inventor.

The same process is also explained in this tutorial: https://learnforge.autodesk.io/#/tutorials/modifymodels.

Petr Broz
  • 8,891
  • 2
  • 15
  • 24
  • Your post implies that the Design Automation API does not have the capability to extract data from an uploaded autoCAD file, which an Autodesk employee explicitly stated it does. Are you suggesting that the capability is not built in to the API itself, and it must be developed as a plugin? – J.E.C. Aug 10 '20 at 12:55
  • That is correct. Design Automation is basically a way for you to run _your custom Inventor/AutoCAD/Revit/3dsMax logic_ on Autodesk servers so that you don't need special hardware or licenses. What your custom logic does is up to you, whether you are modifying your designs, extracting metadata that the Model Derivative service doesn't extract, or anything else. – Petr Broz Aug 10 '20 at 13:05
  • Sorry, one of my colleagues just pointed out that I may have misunderstood your question... If what you're looking for is extracting the *exact same* metadata that would be extracted by the Model Derivative service, then there _is_ a little bit of help on the Design Automation side. Some of the engines - at least Inventor and AutoCAD - provide an "undocumented API" allowing you to convert your designs into the Forge Viewer format (SVF). This format you can then parse with a little bit of effort (for example, using https://github.com/petrbroz/forge-convert-utils), and get the metadata. – Petr Broz Aug 10 '20 at 14:07
  • Here's a sample using the Inventor API to export an assembly into the SVF format: https://github.com/akenson/da-update-user-params/blob/master/UpdateUserParameters/UpdateUserParametersPlugin/SampleAutomation.cs#L196-L276. I'm not aware of any sample for AutoCAD, though. – Petr Broz Aug 10 '20 at 14:40
  • 1
    Here's a sample for AutoCAD: https://github.com/Autodesk-Forge/design.automation-custom-data-viewer – Albert Szilvasy Aug 10 '20 at 18:13
  • That is odd there is an "undocumented API" - doesn't make any sense. – J.E.C. Aug 11 '20 at 11:59