BHoM / admin

Repository for raising central issues and questions; Regarding governance, process and multi-repo and framework compliance
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Creation of CustomObject with key of 'id' #18

Closed jamesramsden-bh closed 2 years ago

jamesramsden-bh commented 2 years ago

Create a custom object with a dictionary item where the key is exactly id. The CustomObject appears to be constructed without error, but inspection of the CustomObject shows that the row with key=id has disappeared.

This either needs fixing (allow the dictionary to be created correctly), or (under my suspicion that id should actually be protected) an error should be thrown and the user should be advised to review their dictionary key names.

Example of current CustomObject creation. Note that exploding does not show a key of id.

image

IsakNaslundBh commented 2 years ago

@jamesramsden-bh this works without any issue on my machine: image

Could you try rightclicking the explode and choose "UpdateOutputs" to make sure the explode component is up to date?

ALso worth checking what if you can acess the object using GetProperty:

image

jamesramsden-bh commented 2 years ago

@emilsvedjer @robinflyman @akaraiskou could one of you / some of you attempt to replicate and see if your output is more like mine or more like Isak's?

robinflyman commented 2 years ago

I tested both your variants (if it would've made any difference) and 'id' showed up both times.

jamesramsden-bh commented 2 years ago

Closing, cannot replicate my original 'issue' on my machine! Thanks @IsakNaslundBh and @robinflyman for your input.