Qid stands for Unique Identifier. It uniquely (and globally) identifies an object in BIM.works. It's String representation is a concatenation of a Vid and Oid Joined by hyphen: "vid-oid": Example: "227e071d-4909-4b5c-8d48-46f44d027c46-1" For memory efficiency, it is advised to not pass around the String representation in a JavaScript context, but use these Qid objects.

For efficient aggregation of Qids, you can use QidSet and QidMap.

This class does not have a public constructor, use any of the following static methods to get a reference to q Qid:

Accessors

Methods

  • Parameters

    • other: Qid

      Must be another Qid instance

    Returns boolean

    Whether the other qid is equal to this qid

  • Returns this Qid's String representation in the form of Vid and Oid Joined by hyphen: "vid-oid": Example: "227e071d-4909-4b5c-8d48-46f44d027c46-1"

    Returns string

  • Get a reference to a Qid by passing "anything". Anything can be either:

    • A Qid instance, this method will simply return the passed object as-is
    • A JS Object, this requires a "vid" and "oid" member to be available on the object
    • A String, it is required that the String is constructed Vid and Oid Joined by hyphen: "vid-oid": Example: "227e071d-4909-4b5c-8d48-46f44d027c46-1"

    Of neither of the above was provided an exception is thrown

    Parameters

    • qid: any

      A Qid, String or Object

    Returns Qid

    A Qid

  • Get a reference to a Qid object by providing it's String representation. When your end goal is to convert a JS array/iterable of string to a QidSet, consider using QidSet.ofIterable which is more performant

    Parameters

    • qid: string

      The String representation of a Qid

    Returns Qid

  • Get a reference to a Qid object by it's vid+oid

    Parameters

    • vid: any

      A Vid (Version UUID)

    • oid: any

      An Oid (Object ID);

    Returns Qid

    A Qid