autodesk-forgeautodeskautodesk-bim360

How to get string type of data_type from Autodesk Platform Services?


I have a problem when I try get file model.sdb from Autodesk Platform Services and query string of data_type. My problem is I want to know data_type of enum number is string or double or any string type, I don't know any api to mapping number enum number with string or double. Any help is appreciated ! enter image description here this is schema example for that :

 },
    {
        "id": 33,
        "name": "Elevation",
        "category": "Constraints",
        "data_type": 3,
        "data_type_context": "autodesk.unit.unit:millimeters-1.0.1",
        "description": null,
        "display_name": "Elevation",
        "flags": 0,
        "display_precision": 1,
        "forge_parameter": null
    },

I expecting I can get string of data_type


Solution

  • The data_type enum has the following values:

    Unknown                 = 0,
    Boolean,
    Integer,
    Double,
    
    /* Special types */
    Blob                    = 10,
    DbKey, /* reprensets a link to another object in the database, using database internal ID */
    
    /* String types */
    String                  = 20,
    LocalizableString, 
    DateTime,       /* ISO 8601 date */
    GeoLocation,    /* LatLonHeight - ISO6709 Annex H string, e.g: "+27.5916+086.5640+8850/" for Mount Everest */
    Position        /* "x y z w" space separated string representing vector with 2,3 or 4 elements*/