0

I'm pulling the SQL lite file for models from ACC but am having a few issues.

        SELECT
                ids.id AS dbId,
                ids.external_id AS externalId,
                attrs.name AS attrName,
                attrs.display_name AS attrDisplayName,
                attrs.category as attrCategory,
                attrs.data_type as attrDataType,
                attrs.data_type_context as attrDataTypeContext,
                vals.value AS valValue,
                attrs.flags
            FROM _objects_eav map
                LEFT JOIN _objects_id ids ON map.entity_id = ids.id
                LEFT JOIN _objects_attr attrs ON map.attribute_id = attrs.id
                LEFT JOIN _objects_val vals ON map.value_id = vals.id

I'm using the above to seed data into a temp table. We're finding that when calling the model derivatives API we're not seeing all the external_Ids from this in the response from the API. link to API documentation

When we group the data

            SELECT DISTINCT
            ti.dbId
            ,ti.externalId
            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentName
            ,max(case when ti.attrName = ? then ti.valValue end) attrParent
            ,max(case when ti.attrName = ? then ti.valValue end) attrTypeId
            ,max(case when ti.attrName = ? then ti.valValue end) attrElementId

            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentSpace
            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentReference
            ,max(case when ti.attrName = ? then ti.valValue end) attrComponentFloor
        FROM

on the above query, we're seeing rows that have distinct id's and external id's but their attrElementId isn't able to be viewed in the model when searching for it in the model derivative API the equivalent data is no where to be found suggesting that it's either a hidden attribute or data that has been deleted from the model but has persisted in it's SQL Lite file.

It would be useful to find out why there is a difference in behaviour as I'm trying to move over to using the SQL lite file over the model derivative in an attempt to reduce load on Autodesk servers.

Does anyone have any insight into the above?

3
  • I think you need to provide more details (and definitions - what is ACC, what is "a model derivative"). Commented Oct 24, 2023 at 15:33
  • Acc is Autodesk construction cloud the model derivative is an API that is provided by ACC aps.autodesk.com/en/docs/model-derivative/v2/reference Commented Oct 24, 2023 at 15:35
  • select DISTINCT dbId from ttBigMap where attrCategory = 'category' and valValue = 'Revit Center line' The issue turned out to be that the ones that were in the models SQL lite file that were not in the derivatives API were of category Revit Center line. I don't know why this data is filtered from the derivatives API and if there are any other categories that AUTODESK remove from their API result that persist in the Models SQL file. Commented Oct 25, 2023 at 23:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.