Using Model derivative API I am able to get geometric properties of 3d dwg file but for 2d dwg I am facing the issue(Unrecoverable exit code from extractor: -1073741831) on extracting geometric properties.
I also understand that model derivative API doesn't provide a support for extracting 2d geometries.
Is any other way to extract geometry of 2d file using programming API(c#)?
EDIT
I have added ObjectTree JSON file and POST URL of "Extract Geometry for Selected Objects into an OBJ File" in the following GitHub link.
https://github.com/Jothipandiyan-jp1/Autodesk
From the error, it seems that your 2D drawing is somehow broken, or not uploaded right. Or is it a vertical file, like Plant 3D or Map 3D?
The Model Derivative should extract the 2D View, you can try the file on A360 Viewer or via API at this sample (C# source).
EDIT
From the comments, it seems you are trying to extract the .obj from a single objectId in the 2D DWG. This should not trigger errors, but it may return empty file as the OBJ format is intended for 3D shapes. Can you update your question with the full POST job
used on your code? Make sure the modelGuid
and objectIds
parameters are correct.