0

I'm finally trying to move my code from the /v1 API to the /v2 API. I'm trying to deal with the scenario of having multiple Revit models linked to each other, and you'd like to have a viewable for each one.

For example, models A, B and C. For links: A -> B and A -> C, B -> A and B -> C, and C -> A and C -> B.

In the old API, we would have worked out the dependencies and registered them with SetReference() before we kicked off the translation.

It appears that in the new API, the new approach is to upload a zip file, and then you can kick off the job by specifying the "root file".

What I'm wondering about now is whether it is possible to upload one zip file, and then create three derivatives (one for each model)? And would be done with a single call to the Create Job? or multiple calls? (my preliminary attempt at multiple calls only gives the last derivative job)

Matt
  • 1,043
  • 5
  • 8

1 Answers1

0

You can only have derivative for one of the models at a time, i.e. you can generate SVF for B from the zip, then later on generate SVF for A from the same zip, but this will overwrite the SVF for B, which now will be lost. Note: one thing to watch out for (same as if you just updated the same file on the server with a different one and generated a new SVF for it) is that the browser might cache the geometry for an SVF. So you might have to clear the browser cache in order to see the newly generated SVF.

If you are storing files on A360/BIM 360 Docs/Fusion Team, then you could set up the relationship between individual files as well: http://adndevblog.typepad.com/cloud_and_mobile/2016/12/setting-up-references-between-files.html

Adam Nagy
  • 1,700
  • 1
  • 9
  • 14
  • So to do the scenario I was mentioning, it sounds like I need to upload the zip file three times, then? – Matt May 04 '17 at 12:28
  • (gotcha - yes, your post is clear on that - thanks!) – Matt May 04 '17 at 12:30
  • Yes, you got it right. (would you mind accepting the answer? :)) – Adam Nagy May 05 '17 at 12:03
  • Adam, does Autodesk provide a sample application that accomplishes this? One that leverages the c# client would be very helpful. – JGeerWM Oct 31 '17 at 17:12
  • Now there is also the reference API in case that better suits your needs - i.e. you can upload the files separately and set up the relationship between them. This way you can ask for a translation for any of the files without having to upload them multiple times: https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-references-POST/ – Adam Nagy Nov 10 '17 at 22:00
  • @AdamNagy, I'm trying to follow the above documentation, but not sure where to apply the checkReferences setting that is called out in the first paragraph. Is this in the header or body of the POST job? – JGeerWM Nov 30 '17 at 16:58
  • @JGeerWM yes, in the POST Job body - probably in the "input" section – Adam Nagy Dec 01 '17 at 13:05
  • Just learned that the POST versions/relationships/ref (https://developer.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-versions-version_id-relationships-refs-POST/) endpoint isn't supported in BIM 360 docs: Response (400) BadRequest', response content: {{"jsonapi":{{"version":"1.0"}},"errors":[{{"id":"55dd799b-3b9f-47ba-a255-e0189847c972","status":"400","code":"FUNCTION_NOT_SUPPORTED","detail":"BIM360 currently does not support the creation of refs."}}]}} – JGeerWM Jan 15 '18 at 14:57