ModelDeriviate's manifest is missing URN for SVF2 - autodesk-forge

I know that it is possible to download the derivatives via their respective urns. However, the SVF2 object in the manifest doesn't contain its urn. Therefore, I cannot download the derivative as explained here or here. Is this not supported yet? And can I compute the urn from the data returned in the manifest?
Extract of an manifest example:
{
"urn": "SOME_URN",
"derivatives": [
{
"hasThumbnail": "true",
"children": [
{
"useAsDefault": true,
"role": "3d",
"hasThumbnail": "true",
"children": [
{
...
},
{
...
},
{
"role": "graphics",
"mime": "application/autodesk-svf2",
"guid": "SOME_GUID",
"type": "resource"
}
],

I'd like to make clear that it is possible to download the SVF2 'files' since your WEB browser can do it; therefore, you can access the data as well. The files are actually cached in your Browser, see below.
The Viewer downloads an extra manifest files (otg_model.json) which contains additional information. But downloading the 'files' on your local machine will not help since it requires a lot of setup to get the Viewer work properly with a local SVF2 storage. And with the current state of the technology, it is highly recommended you do not try to do this in production. When it comes to development, and debugging, I go a sample posted here which can help. But please be careful with the Autodesk EULA on doing offline workflows. This sample is a replacement of the old extract.autodesk.io sample as people were abusing of this website, and can work with both SVF and SVF2.
To answer the question in the comment section. SVF2 is still in beta, and access to the underlying data/files will probably be only available at the end on the beta. The main reason is that SVF2 and the Viewer code evolves too rapidly today to make a general availability to everything. So unless you keep updating them on your local machine, things may break, and therefore Autodesk is limiting the access.

Sorry for disappointing you, but ...
Unfortunately, it's expected behavior. SVF2 doesn't have a concept of URN, and you cannot download SVF2 for offline viewing at this moment since it's unsupported.

Related

How to Add File Reference to Quality Issue

Via the BIM360 API, I am able to create Quality Issues and upload files (to be used as attachments). However, even though I am calling Post Attachments (https://forge.autodesk.com/en/docs/bim360/v1/reference/http/field-issues-attachments-POST/) (and all responses are good), nothing appears on the Issue screen.
Issue screen with manually added file. How can I make my attached file appear under the References->Files section?
(Note, I saw a mention elsewhere of the relationships API, but I get a random error just calling the first "asset" API [{"title":"Forbidden","detail":"Forbidden","errorCode":"GENERAL_ERROR","type":"https://developer.api.autodesk.com/bim360/assets/v1/error-codes/GENERAL_ERROR"}])
firstly, the screenshot shows you are working with Issues in Autodesk Construction Cloud (ACC), while the API you are using is for BIM360 Issue. This API is NOT compatible with ACC.
To work with ACC Issue, the API is available at the category of ACC:
https://forge.autodesk.com/en/docs/acc/v1/reference/http/issues-issues-GET/
this blog tells more.
https://forge.autodesk.com/blog/acc-issues-api-available-preview
In the context of ACC, the attachment(references) is managed by the general API (Relationship API). In Additional Tests of Postman collection of ACC Issue API, I demoed how to add Photo with the Issue. The logic is similar.
https://github.com/Autodesk-Forge/forge-acc.issues.api-postman.collection
Firstly, use Data Management API to get the document urn. Then, use ACC Issue API to get id of one issue. finally, use Relationship API to bind them.
PUT https://developer.api.autodesk.com/bim360/relationship/v2/containers/{{project_id_without_b}}/relationships
P.s. -bim360- in the domains is just because of legacy design of the terminologies. It can work for the contexts of both BIM360 and ACC (note it is Relationship API can work within both of the contexts)
Payload:
[
{
"entities": [
{
"domain": "autodesk-bim360-issue",
"type": "issue",
"id": "{{one_issue_id}}"
},
{
"domain": "autodesk-bim360-documentmanagement",
"type": "documentlineage",
"id": "{{one_document_urn}}"
}
]
}
]

AutoCAD.PlotToPDF+prod Last Page Missing From Resulting PDF

We're using the shared Forge activity "AutoCAD.PlotToPDF+prod" to get back a plotted DWG in a PDF file, but the resulting PDF is missing the last layout from the DWG. However, there see to be some cases where the last page does get included. There are no obvious differences between the DWGs that include the last page when plotted to PDF and those who don't. Is there any reason why these shared Forge activity wouldn't include the last layout from the source DWG?
This is something that's holding us up from completing a large feature implementation before deploying it to production, so we'd like to find out if we're not going to be able to use the shared activity to make this work so that we can implement a work-around and prevent missing the deadline for delivery.
Thanks in advance.
Here is an example of the input versus output.
The provided drawing is dependent on external reference "background.bmp" as overlay, Forge Design Automation is not aware of the dependent reference, you need to provide that as well.
If your drawing depends on external files, you need to zip them and send, and make sure to provide path of main drawing that to be processed in pathInZip argument of workitem.
For example
{
"activityId": "AutoCAD.PlotToPDF+prod",
"arguments": {
"HostDwg": {
"localName": "Outputs",
"pathInZip": "Output.dwg",
"url": "downloadUrl",
"verb": "get"
},
"Result": {
"url": "uploadUrl",
"verb": "put"
}
}
}

Phase Views in manifest after RVT model translation, how to detect or suppress?

We have a Revit model where we have configured a single 3D View in Publish Settings. We published that model to BIM 360 and are using Forge to extract the list of 3D Views.
We notice that after the model is translated, the only views available in BIM360 are the views included as set in the Publish Settings in Revit, irregardless of phase, but are under the Phases icon, when we extract the Views from the manifest we also get additional views that were created because some objects belong to different Phases. We don’t seem to be able to distinguish between the different views or see a relationship between different phases of the same view.
Is there a way to do that? or not to translate the additional phase views at all?
The extract below shows us the {3D} view and the Phase Views created “Existing” and “New Construction” using GET
https://developer.api.autodesk.com/modelderivative/v2/designdata/:urn/manifest
Manifest:
Those phased 3D views are from the mater view for each phase, you can suppress them by submitting translation jobs like below:
// POST https://developer.api.autodesk.com/modelderivative/v2/designdata/job
// with `x-ads-force: true` Reuest header
{
"input": {
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YWRuZGVtby9ob3VzZS5ydnQ"
},
"output": {
"formats": [
{
"type": "svf",
"views": [
"2d",
"3d"
],
"advanced": {
"generateMasterViews": false
}
}
]
}
}
Note. The generateMasterViews option in BIM360 Docs is turned on by default and the translation job will be submitted automatically while the model was uploaded to Docs managed bucket successfully, currently.
Note 2. Triggering any translation jobs yourself on the models of the BIM360 Docs will consume extra Forge Cloud Credits. So, you have to use it carefully at your own risk.
Ref: https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/#body-structure

Monitoring progress of extraction job of file in a bucket?

I want to monitor the progress of an extraction job of a file stored in a bucket.
I've gone through the Webhooks API documentation, and if I understood everything correctly, the events only work for files stored in a folder, so it can't be used with a bucket. Please correct me if I'm wrong.
So, besides polling the GET :urn/manifest endpoint in the Model Derivate API, and assuming the Webhooks API can't be used with a bucket, is there any other way to monitor the progress of an extraction job?
Thanks.
Webhook now supports the Model Derivative event extraction.finished. This type is exactly used in the scenario of translating model of the bucket.
This is a blog on the API. I copied it as a reference on SO:
https://forge.autodesk.com/blog/introducing-webhook-model-derivative-api
Webhook now supports the Model Derivative event extraction.finished, so your app can be notified when translation job finishes.
To use it, (1) create a hook specifying a scope.workflow:
{
"callbackUrl": "http://bf067e05.ngrok.io/callback",
"scope": {
"workflow": "my-workflow-id"
}
}
And (2) when posting a translation job, specify the misc.workflow:
{
"input": {
"urn":
"dXJuOmFkc2sub2JqZWN0czpv...."
},
"output": {
"formats": [{
"type": "obj"
}]
},
"misc": {
"workflow": "my-workflow-id"
}
}
With my test, the workflow can be guid of your WebHook.The post body from Forge will tell you which file is translated and its urn, location etc.
Hope it helps.

Where does Chrome download synced extensions from?

Say I was to sign into a new user on Chrome and had extensions from a previous computer synced to my account. Where are these extensions downloaded from after I sign? I thought maybe update_url in manifest.json but I'm not sure.
Let's examine an actual sync payload through chrome://sync-internals/
"SPECIFICS": {
"encrypted": true,
"extension": {
"disable_reasons": "0",
"enabled": true,
"id": "ijglncoabcgieiokjmgdogpefdblmnle",
"incognito_enabled": false,
"installed_by_custodian": false,
"name": "Desktop Notifications for Stack Exchange",
"remote_install": false,
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "1.6.12"
}
},
From this, Chrome does see the update_url, which it can query for the download URL according to auto-update protocol. Note that the actual extension is not hosted at that URL, that URL merely contains instructions on where to download it from. In this instance, the download will be from the Chrome Web Store.
It will also sync disabled status across instances: a disabled extension will still be downloaded, but will be disabled immediately.
Since non-enterprise versions can't install from anywhere but CWS, and non-CWS enterprise installs take their update_urls from policies and not Sync, I think the answer to your question is almost certainly "from CWS". Can't test it though.