By Shiya Luo
AutoCAD files are connected to each other as xref (short for external references). Files are linked like a graph. File A can reference file B, which can reference file A back. It’s a bit meta, like reference inception. What’s different however, is that you only have to set the parent children relationship once, if two files reference each other, you can stop as long as you have linked the two files together once. The translation service will go in and look for the particular reference inside your .dwg files.
Again, the workflow is:
Some useful resources before you start:
Use Postman or some other REST API tools, or this interactive guide that contains the workflow of View and Data APIs.
Read the documentation.
POST /references/v1/setreference HTTP/1.1 Host: developer.api.autodesk.com Authorization: Bearer <your-token> Content-Type: application/json { "master" : "urn:adsk.objects:os.object:shiyas-bucket-12345/Cylinder1.dwg", "dependencies" : [{ "file" : "urn:adsk.objects:os.object:shiyas-bucket-12345/Cylinder2.dwg", "metadata" : { "childPath" : "Cylinder2.dwg", "parentPath" : "Cylinder1.dwg" } } ] }
POST /references/v1/setreference HTTP/1.1 Host: developer.api.autodesk.com Authorization: Bearer Content-Type: application/json { "master" : "urn:adsk.objects:os.object:shiyas-bucket-12345/Box.dwg", "dependencies" : [{ "file" : "urn:adsk.objects:os.object:shiyas-bucket-12345/Cylinder1.dwg", "metadata" : { "childPath" : "Cylinder1.dwg", "parentPath" : "Box.dwg" } } ] }After setting the reference, fire them off for translation. In the end you should get something that looks like this:
Ask questions here in the comments or on the forum if you have any additional questions.
Thanks, One of the Useful Article about AutoCAD Autocad Institute in Hyderabad
Posted by: BSB CADD Hyderabad | 01/19/2016 at 04:40 AM