Accessing rhino object attributes in Rhino Compute (via ObjectAttribute, ObjectUserData, or any other)

  1. File3dmObject.attributes().layerIndex; works on Rhino Compute.

  2. Similarly, I’d like to access object attributes that is attached to rhino objects either as read through 1) ObjectUserData or 2) ObjectAttribute

My question is: Is it possible to do 2? I have not been able to successfully print this in javascript console.

Thank you!

1 Like

You might find something useful in the code we have for writing the 3dmLoader for three.js. While not directly compute related, it uses the rhino3dm library, which is what is used to read objects from a file or from the results of a compute call. This part of the code goes through the object, checks the type, extracts relevant info, and then goes to the attributes.

Let me know if that helps!


Thanks a lot!