0

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

  • Hi, without AutoCAD API (desktop API), what I can think of is to use Forge Viewer API to get out some geometry data of 2D .dwg. In one code of my colleague, there are some lines. https://github.com/jaimerosales/viewer-dwgoffset/blob/master/src/client/components/Viewer/Viewer-Helpers.js#L202. It dumps the primitives of the 2D entities. Obviously it is JavaScript. Will this help a bit to you? – Xiaodong Liang Aug 21 '17 at 14:04

1 Answers1

0

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.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
  • While I am trying this to fetch geometries I getting this error (Unrecoverable exit code from extractor: -1073741831). curl -X 'POST' -H "$key" -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job' -d '{"input": {"urn":"2dDWGURN"},"output": {"formats": [{"type": "obj","advanced": {"modelGuid":"...","objectIds":[1908]}}]}}' – jothi pandiyan Aug 23 '17 at 06:02
  • I am able view the 2d dwg using Viewer api. But while extracting geometry from derivative api I am getting error. {"name":"LMV Bubble","status":"failed","progress":"complete","messages":[{"type":"error","message":"Unrecoverable exit code from extractor: -1073741831","code":"TranslationWorker-InternalFailure"}] – jothi pandiyan Aug 23 '17 at 06:19
  • Hi @jothipandiyan, I am still a bit confused when you said 'getting geometry from 2D dwg by derivative api ', (looks you actually referred to translate specific objects of a model to obj format). Anyway since the error shows a failed translation, could you share the URN? I can check in the backend log to see what happened with the translation. TranslationWorker-InternalFailure normally means a problem of extractor of the corresponding file format. – Xiaodong Liang Aug 23 '17 at 09:22
  • This is the URN. dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YnVja2V0M2pwLzQ1UmV2Qi5kd2c – jothi pandiyan Aug 23 '17 at 09:48
  • I failed to find the record for this urn in the internal log. I am asking engineer team to check it. – Xiaodong Liang Aug 23 '17 at 13:45
  • Just noticed that if you copy above URN and pasted anywhere then it's adding some extra character to that URN(I don't know why it's happening like that ). So I am splitting the URN and pasting it here. can you combine both and test it again. 1. dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YnVja2V0M2pwLzQ1UmV2Qi5k and 2. d2c – jothi pandiyan Aug 23 '17 at 14:18
  • Hi Augusto, Can you review my changes in above question? – jothi pandiyan Aug 23 '17 at 16:13
  • Hi, Augusto and Xiaodong any finding on this issue? – jothi pandiyan Aug 24 '17 at 14:29
  • Can you share a file where this problem happens? If so, please send to forge.help at autodesk.com, please do not send confidential information. – Augusto Goncalves Aug 24 '17 at 14:34
  • Hi @jothipandiyan, the initial diagnosis shows the exception may be that the extractor only supports mesh data, not support line data in the 3D model. Our engineer logged a change request in the internal database: DERI-4418. If you could provide a file copy to us, we an give it a test if it can work after removing the lines. – Xiaodong Liang Aug 25 '17 at 03:35