In v1 of Data and View API I had to upload all files and link them together using
references/v1/setreference
and after that register each of them for translation. This had an advantage that I could display in the viewer every linked file alone or all linked together. Also I could associate 3D and 2D views with each file in my database.
In API v2 I need to send a POST JOB using
modelderivative/v2/designdata/job
Where I pass urn urn of an object which has been uploaded in zip format and given rootFilename. So far, ok. I do not have to care about references, that's cool, less work. But none of JSONs I can get using model derivative api contains information about urns of linked files and their views(of others than rootfile). So where are they?
Example scenario: (was possible in API v1)
Let's say I want to upload ZIP containing 3 revit files linked together
- master - house.rvt
- hvac - hvac.rvt
- electro - electro.rvt
Master references hvac and electro and both hvac and electro cross-references the master.
Then I will upload a zip file, succesfully translate into SVF and now I want to display in the viewer hvac.rvt, not master with all together! Hvac.rvt has cross reference to master with turned off visibility in 3D views:
When I tried this, I can access only 3D and 2D views of the master. There are no views from linked files even they exists in the files and were accessible before.
manifest: modelderivative/v2/designdata/:urn/manifest
metadata: modelderivative/v2/designdata/:urn/metadata
even full info: viewingservice/v1/{urn}/all
none of them contains any information about linked files. Only exception is designDescription.json(when downloading full bubble) there is mentioned that model has links and which ones.
Example (real case):
{
"name" : "Autodesk Design Description",
"version" : "0.1",
"designDescription" : {
"id" : "f75c0132-b0cf-42dd-9ef9-b0a3d7be0669",
"name" : "My XRef File Design",
"currentVersion" : "1",
"designGraphs" : [{
"creationDate" : "2016-07-30 13:24:33",
"creatingService" : "RVT LMV Extractor XRef",
"rootIds" : [1],
"designObjectRefs" : [],
"designObjects" : [{
"id" : 1,
"version" : 0,
"about" : "urn:adsk.objects:os.object:bucket/Model.zip",
"relativePath" : "MainModel_A.rvt",
"displayName" : "MainModel_A.rvt",
"contentType" : ".rvt",
"shareInfo" : null,
"references" : [{
"type" : "x-ref",
"ids" : [2]
}
],
"metadata" : {}
}, {
"id" : 2,
"version" : 0,
"about" : "",
"relativePath" : "MEPModel_B.rvt",
"displayName" : "MEPModel_B.rvt",
"contentType" : ".rvt",
"shareInfo" : null,
"references" : [{
"type" : "x-ref",
"ids" : [3]
}
],
"metadata" : {}
}, {
"id" : 3,
"version" : 0,
"about" : "urn:adsk.objects:os.object:bucket/Model.zip",
"relativePath" : "MainModel_A.rvt",
"displayName" : "MainModel_A.rvt",
"contentType" : ".rvt",
"shareInfo" : null,
"references" : [],
"metadata" : {}
}
]
}
]
}
}
but again there is no location for linked file. There is a property "relativePath" but leads to where?
Documentation at https://developer.autodesk.com says almost nothing about working with referenced files..
How do I fulfill this scenario again? (Before changes this was already implemented functionality of bigger application almost ready for distribution) Now I have to upload same files multiple times for each linked file? Or how? Please, any ideas?