Custom User Data
Attach custom user data to objects • Last modified on 9/17/2019 • edit

Custom data can be attached to most objects you send within Speckle. This allows for enriched data transfer alongside basic geometry and primitive data.

To do this, use the "UserData.Set" node included in the Speckle plugin. This node takes in the object you with to attach the user data to and the dictionary of user data. Once you attach the dictionary, the object can now be sent along as usual.

send

To unpack the data from the object, use the "UserData.Get" node included in the Speckle plugin. This will expose all the properties that were set and their values.

example

If you wish to access the data elsewhere (such as through the API), all of user data is accessible under the properties propperty of the SpeckleObject. An example of this is shown below.


{
  "type": "Point",
  "value": [...],
  "hash": "01cb82d81078a3cec1b138149e1d657f",
  "properties": {
    "name": "floor",
    "height": 23
  }
}