Search code examples
autodesk-forgeautodesk-bim360

translated viewe name on BIM 360


is there any way to see the translated view name on BIM360 using Forge API?

enter image description here


Solution

  • There is 3 ways to do this:

    1. the manifest endpoint contains that information. See the name property in the example below.
    {
        "urn": "dXJuOmFkc2...bGFnZUJJTS5ydnQ",
        "derivatives": [
            {
                "hasThumbnail": "true",
                "children": [
                    {
                        "guid": "53a6e995-4cf9-0aa6-c3ef-68a4b6150dbf",
                        "type": "geometry",
                        "role": "3d",
                        "name": "{3D}",
                        "viewableID": "8a8b24b1-b87d-4238-adcc-ef2c1ea155aa-0005d884",
                        "phaseNames": "Nouvelle construction",
                        "status": "success",
                        ...
                    },
                    {
                        "guid": "f16dbf36-6b14-4da3-abcd-5ff97b894304-0005da20",
                        "type": "geometry",
                        "role": "2d",
                        "name": "A101 - Sans nom",
                        "viewableID": "f16dbf36-6b14-4da3-abcd-5ff97b894304-0005da20",
                        "status": "success",
                        ...
                    },
                    ...
                 ],
                 ...
            },
            ...
    }
    
    1. If you are running in the viewer, you can either use
    doc.getRoot().search({
        type: 'geometry',
        //role: '3d' // optional filter, could be 2d or 3d, comment to get all
    })