Request

Response

    Classes

    PropertyDatabase

    new PropertyDatabase()

    The Property Database contains property information for each part of a model. The data is read-only, since it has been packed to optimize memory footprint. It’s implemented as an Entity-Atribute-Value (EAV) set of tables. LMV keeps the PropertyDatabase in a browser worker thread to prevent compute-intensive methods to block the main browser UI thread. Words "Attribute" and "Property" are use interchangeably.

    Methods

    getObjectCount()

    Obtains the number of database ids (dbIds) available. These ids range betwee 1 (inclusive) up to getObjectCount() (exclusive).

    Returns

    typedescription
    number

    getAttrValue(attrId, valId, integerHint)

    Obtains the actual value of a property.

    Parameters

    attrId*
    number
    The attribute id
    valId*
    number
    The value id
    integerHint
    boolean
    If true the return value will be casted to integer.
    * Required

    Returns

    typedescription

    getObjectProperties(dbId, propFilter, ignoreHidden, propIgnored)

    Obtains all properties for a given database id.

    Parameters

    dbId*
    number
    The database id
    propFilter
    Array.<string>
    Array of property names to return values for. Use null for no filtering.
    ignoreHidden
    boolean
    true to ignore hidden properties.
    propIgnored
    Array.<string>
    Array of property names to not include in the return value.
    * Required

    Returns

    typedescription
    object consisting of attributes name, dbId, properties and externalId.

    getExternalIdMapping(extIdFilter)

    Obtains a map between each database id (dbId) and their corresponding external-id. The external-id is the identifier used by the source file. Example: A translated Revit file has a wall with dbId=1, but in Revit (desktop application) the identifier of that wall is &quot;Wall-06-some-guid-here&quot;.

    Parameters

    extIdFilter
    Array.<number>
    Limits the result to only contain the ids in this array.

    Returns

    typedescription
    object map from dbId into external-id.

    getSearchTerms()

    Given a text string, returns an array of individual words separated by white spaces. Will preserve white spacing within double quotes.

    bruteForceSearch()

    Searches the property database for a string.

    Returns

    typedescription
    Array of ids.

    bruteForceFind()

    Given a property name, it returns an array of ids that contain it.

    getLayerToNodeIdMapping()

    Specialized function that returns: {

    ‘layer-name-1’: [id1, id2, …, idN], ‘layer-name-2’: [idX, idY, …, idZ], …

    }

    getAttributeDef(attrId)

    Unpacks an attribute value into all available components.

    Parameters

    attrId*
    number
    The attribute id.
    * Required

    Returns

    typedescription
    object containing name, category, dataType, dataTypeContext, description, displayName and flags.

    enumAttributes(cb)

    Invokes a callback function for each attribute-id in the model.

    Parameters

    cb*
    function
    Callback invoked
    * Required

    Examples

    pdb.enumAttributes(function(attrId, attrDef) {
            // attrDef is an object
            if (attrDef.name === 'name') {
                return true; // return true to stop iteration.
            }
       })
    

    enumObjectProperties(dbId, cb)

    Iterates over all properties for a given database id and invokes the supplied callback function.

    Parameters

    dbId*
    number
    The attribute id.
    cb*
    function
    callback function, that receives 2 arguments: attribute-id (attrId) and value-id (valId). Have the function return true to abort iteration.
    * Required

    findLayers()

    Iterates over the property database and finds all layers.

    Returns

    typedescription
    object

    enumObjects(cb, fromId, toId)

    Iterates over all database ids and invokes a callback function.

    Parameters

    cb*
    function
    callback function. Receives a single parameter: the database-id. Have the function return true to abort iteration.
    fromId*
    number
    starting id (inclusive)
    toId*
    number
    end id (exclusive)
    * Required

    attributeHidden(attrId)

    Checks whether an attirbute is hidden or not.

    Parameters

    attrId*
    number
    The attribute id.
    * Required

    Returns

    typedescription
    boolean true if the attribute is a hidden one.
     
    ______
    icon-svg-close-thick

    Cookie preferences

    Your privacy is important to us and so is an optimal experience. To help us customize information and build applications, we collect data about your use of this site.

    May we collect and use your data?

    Learn more about the Third Party Services we use and our Privacy Statement.

    Strictly necessary – required for our site to work and to provide services to you

    These cookies allow us to record your preferences or login information, respond to your requests or fulfill items in your shopping cart.

    Improve your experience – allows us to show you what is relevant to you

    These cookies enable us to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we use to deliver information and experiences tailored to you. If you do not allow these cookies, some or all of these services may not be available for you.

    Customize your advertising – permits us to offer targeted advertising to you

    These cookies collect data about you based on your activities and interests in order to show you relevant ads and to track effectiveness. By collecting this data, the ads you see will be more tailored to your interests. If you do not allow these cookies, you will experience less targeted advertising.

    icon-svg-close-thick

    THIRD PARTY SERVICES

    Learn more about the Third-Party Services we use in each category, and how we use the data we collect from you online.

    icon-svg-hide-thick

    icon-svg-show-thick

    Strictly necessary – required for our site to work and to provide services to you

    Qualtrics
    W
    Akamai mPulse
    W
    Digital River
    W
    Dynatrace
    W
    Khoros
    W
    Launch Darkly
    W
    New Relic
    W
    Salesforce Live Agent
    W
    Wistia
    W
    Tealium
    W
    Upsellit
    W
    CJ Affiliates
    W
    Commission Factory
    W
    Google Analytics (Strictly Necessary)
    W
    Typepad Stats
    W
    Geo Targetly
    W
    SpeedCurve
    W
    Qualified
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Improve your experience – allows us to show you what is relevant to you

    Google Optimize
    W
    ClickTale
    W
    OneSignal
    W
    Optimizely
    W
    Amplitude
    W
    Snowplow
    W
    UserVoice
    W
    Clearbit
    #
    YouTube
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Customize your advertising – permits us to offer targeted advertising to you

    Adobe Analytics
    W
    Google Analytics (Web Analytics)
    W
    AdWords
    W
    Marketo
    W
    Doubleclick
    W
    HubSpot
    W
    Twitter
    W
    Facebook
    W
    LinkedIn
    W
    Yahoo! Japan
    W
    Naver
    W
    Quantcast
    W
    Call Tracking
    W
    Wunderkind
    W
    ADC Media
    W
    AgrantSEM
    W
    Bidtellect
    W
    Bing
    W
    G2Crowd
    W
    NMPI Display
    W
    VK
    W
    Adobe Target
    W
    Google Analytics (Advertising)
    W
    Trendkite
    W
    Hotjar
    W
    6 Sense
    W
    Terminus
    W
    StackAdapt
    W
    The Trade Desk
    W
    RollWorks
    W

    Are you sure you want a less customized experience?

    We can access your data only if you select "yes" for the categories on the previous screen. This lets us tailor our marketing so that it's more relevant for you. You can change your settings at any time by visiting our privacy statement

    Your experience. Your choice.

    We care about your privacy. The data we collect helps us understand how you use our products, what information you might be interested in, and what we can improve to make your engagement with Autodesk more rewarding.

    May we collect and use your data to tailor your experience?

    Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.