0

I try to get the dbIds of Navisworks items which have a specific property.

The NWDs get translated to SVF2, using the default settings.

When I query the property DB, I get different dbIds than the dbIds that are returned from the {urn}/metadata/{guid}/properties endpoint.

Query with results:query with results

Snippet of the corresponding json data:

[{
    "objectid": 11,
    "name": "3D Solid",
    "externalId": "0/1/0",
    "properties": {
        "Neanex Connector": {
            "ibcNAME": "Cone-1",
            "ibcGUID": "6453c4c067d1476db9c68c4066e291c4"
        }
    }
},
{
    "objectid": 2,
    "name": "SomeSolids-1.nwd",
    "externalId": "0",
    "properties": {
        "Neanex Connector": {
            "ibcNAME": "SomeSolids-1",
            "ibcGUID": "2613704afaeb4e68bcb1600a737df0b7"
        }
    }
},
{
    "objectid": 27,
    "name": "3D Solid",
    "externalId": "1/5/0",
    "properties": {
        "Neanex Connector": {
            "ibcNAME": "Wedge-2",
            "ibcGUID": "25d5fb2daebe4a3fb3eb1c671012d5f3"
        }
    }
},
{
    "objectid": 3,
    "name": "SomeSolids-2.nwd",
    "externalId": "1",
    "properties": {
        "Neanex Connector": {
            "ibcNAME": "SomeSolids-2",
            "ibcGUID": "425212b48a45457f9f9d5192e84bb0a4"
        }
    }
}]

Summary:

SQLite dbId External ID json dbId GUID
2 0 2 2613704afaeb4e68bcb1600a737df0b7
6 0/1/0 11 6453c4c067d1476db9c68c4066e291c4
15 1 3 425212b48a45457f9f9d5192e84bb0a4
27 1/5/0 27 25d5fb2daebe4a3fb3eb1c671012d5f3

Which dbIds are the correct ones?

Why the differences?

Regards

Wolfgang

Eason Kang
  • 6,155
  • 1
  • 7
  • 24
WoWeh
  • 58
  • 5

2 Answers2

0

As I know, the dbIds in SQLite DB will be svf dbIds. If you want to get svf dbIds after translating to svf2, you will need to call the below APIs with an extra header x-ads-derivative-format: fallback. Otherwise, the objectIds you got from the properties API will be svf2 dbIds.

Eason Kang
  • 6,155
  • 1
  • 7
  • 24
  • Thank you for the information that dbIds in SQLite DB will be always be the 'old' svf dbIds. The only source of information that I found about the SQLite DB is this blogpost: https://forge.autodesk.com/blog/accessing-design-metadata-without-viewer Perhaps I missed some other documentation? – WoWeh Jun 14 '22 at 13:30
  • From what I can see, it's crucial to first use the `x-ads-derivative-format: fallback` header with the POST, otherwise the dbIds returned from metadata endpoints will always be svf2 format. See also: - https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/ Quote: 3. If you use this header with one derivative (URN), you must use it consistently across the following endpoints, whenever you reference the same derivative. - POST job (for OBJ output) - GET {urn}/metadata/{guid} - GET {urn}/metadata/{guid}/properties – WoWeh Jun 14 '22 at 13:32
0

Two crucial pieces of information:

  1. There are 'old' SVF dbIds, and newer SVF2 dbIds, see:

  2. The dbIds in the SQLite properties DB are always 'old' SVF dbIds

Using the header x-ads-derivative-format: fallback works fine, and you always get the 'old' SVF dbIds.

Note: If you use this header with one derivative (URN), you must use it consistently across the following endpoints, whenever you reference the same derivative.

  • POST job (for OBJ output)
  • GET {urn}/metadata/{guid}
  • GET {urn}/metadata/{guid}/properties
WoWeh
  • 58
  • 5