Autodesk Forge - refPoint info in SQLLite db - autodesk-forge

I have 3 revit models on BIM360 and I want to view them in a Forge Viewer.
To do this, I aggregated the 3 models with the information provided at this link Revit shared coordinates to Forge viewer, and everything is OK.
I want to know if is possibile to get refPoint information in the model's SQLLite db (https://forge.autodesk.com/blog/accessing-design-metadata-without-viewer)
Is it possible?
TIA
Alder

Unfortunately, the refPoint data is extracted into AEC Model Data only. It's a JSON file. You can get see it in the model manifest via calling GET :urn/manifest and download it by using GET {urn}/manifest/{derivativeurn}
{
"urn": "urn:adsk.viewing:fs.file:dXJuOmFkc2sud2lwcH....x/output/Resource/AECModelData.json",
"role": "Autodesk.AEC.ModelData",
"mime": "application/json",
"guid": "a4aac952-a3f4-031c-4113-b2d9ac2d0de6",
"type": "resource",
"status": "success"
},
ref: https://forge.autodesk.com/blog/consume-aec-data-which-are-model-derivative-api

Related

Derivatives API not returning Properties.db file

We have seen few times that the properties.db file is coming with the converted model when using the derivative APIs.
I also tried the extract node module and the zip file does not contain properties.db too.
is there any change in the api for retrieving that file?
regards,
Afshin
Unfortunately there's no specific API dedicated to retrieve the property DB file.
You can get its path by looking up the manifest after the model is completed extracted/translated and download it from there using the GET :urn/manifest/:derivativeurn endpoint:
{
"guid": "...",
"type": "resource",
"urn": "urn:adsk.viewing:fs.file:<urn>/output/properties.db",
"role": "Autodesk.CloudPlatform.PropertyDatabase",
"mime": "application/autodesk-db",
"status": "success"
},
In case it's not generated let us know the URN by dropping a line to forge.help at autodesk.com so we can look into it.

Download a Document with Autodesk API

I'm trying to download documents from BIM 360 Docs. If I want to download a file with the type "type": "items:autodesk.bim360:File" I just need to get the bucketID and objectID (/projects/<projectID>/items/<itemID>) and call buckets/<bucketID>/objects/<ObjectID>. (I used this tutorial)
But how do I download a file with the type "type": "items:autodesk.bim360:Document"?
First, I get the version of the document /projects/<projectID>/items/<itemID>/versions. After that I call projects/<ProjectID>/versions/<versionID>/downloadFormats but it returns an empty JSON. The call projects/<ProjectID>/versions/<versionID>/downloads returns a 400 Bad Input. Whats the right way to get the bucket & objectID from a "document"? The way from the tutorial doesn't work because there is no "storage" tag in the JSON (example).
For BIM 360 Project Folder items, follow the tutorial here to download document.
Basically you will need to obtain the URN of the document from the relationships.storage.data.id field via GET projects/:project_id/folders/:folder_id/contents.
For item type items:autodesk.bim360:Document, call GET projects/:project_id/versions/:version_id/relationships/refs to obtain the storage locations:
"storage": {
"meta": {
"link": {
"href": "/oss/v2/buckets/wipbucket/objects/urn:adsk.objects:os.object:wip.dm.prod%2F9f8bdc3f-e29c-4ada-ab7b-bb8dfa821163.pdf"
}
}
See doc here.

Unable to get revit filemeta data or see revit model in 3d viewer for forge modelderivative API

We have been using the model derivative api endpoints to extact data from forge but are currently having issues extracting meta data when uploading specifically Revit files.
Our process goes:
Auth
Upload a model in chunks https://developer.api.autodesk.com/oss/v2/buckets/{bucketKey}/objects/{objectName}/resumable
Create upload job https://developer.api.autodesk.com/modelderivative/v2/designdata/job
Get translation the process https://developer.api.autodesk.com/modelderivative/v2/designdata/{encodedUrn}/manifest
Get the object from the forge https://developer.api.autodesk.com/modelderivative/v2/designdata/{encodedUrn}/metadata
Current we are we receive a 200 response from step 5 with and empty meta information so we cannot extract anything.
When we load the 3D viewer (versions 6.0 and 4.0) the viewer calls the https://developer.api.autodesk.com/derivativeservice/v2/manifest/
When
"messages": [
{
"type": "error",
"code": "Revit-UnsupportedFileType",
"message": "<message>The file is not a Revit file or is not a supported version.</message>"
},
{
"type": "error",
"message": "Possibly recoverable warning exit code from extractor: -536870935",
"code": "TranslationWorker-RecoverableInternalFailure"
}
],
It was converted from an ifc format if that helps in any way.
We have tried this file in 360 and in forge with both revit and ifc before and translation has worked. I can provide a urn also.
As reported by #Glenit, it was missing some pieces on the resumable upload. For reference, this answer points out some samples on it.

Forge - Revit-UnsupportedFileType

I’m trying to integrate Forge viewer with my sample application and facing some issues.
Below are the steps I tried to achieve my goal.
Registered an app by creating a new account and generated “client ID” and “secret key” (success).
Generate Oauth token for further API calls (success).
Create a new bucket storage (success).
Upload model to the bucket and create URN for the model (success).
Design data for model translation (this is the step where our uploaded model will be translated to SVF) (success).
Check status of translated file. (success response but with error message as given below).
"messages":
[
{
"type": "error",
"code": "Revit-UnsupportedFileType",
"message": "The file is not a Revit file or is not a supported version."
},
{
"type": "error",
"message": "Possibly recoverable warning exit code from extractor: -536870935",
"code": "TranslationWorker-RecoverableInternalFailure"
}
],
Any help would be highly appreciated.
Are you able to upload & view the file using the public viewer? If so, most likely your upload routine (step 4) is corrupting the file. In this case, are you using resumable upload?
Samples for resumable upload:
C#
Nodejs

Box.com Content API: Add Collaboration

When using Box.Com APi, Add Collaboration method (https://developers.box.com/docs/#collaborations-add-a-collaboration) there's a parameter that states that its type is object (the accessible_by parameter). This is an example of something that is actually all over the documentation.
Reading the documentation, seems to me that these are objects in mini format, but they don't state the type.
Here is the object format for the accessible_by parameter used in the Create Collaboration endpoint:
"accessible_by": { "id": "USER_ID", "type": "user" }