Find connected links in binding


ist is possible to get the links of a node from within a binding?
I have created an example here:

Do you know why it’s always returning 0?

In general one cannot use bindings when dealing with relationships. Really, at the time that bindings are first evaluated, there probably are no relationships yet between that Part and any others.

I don’t know what you want to accomplish. Perhaps you want to implement a Node.linkConnected event handler?

Okay, I was afraid it isn’t that easy :-)
Actually it is related to this question.

I thought I could create a binding on the detail node and within the binding find the “main” node through the link and then load the data from there. This way I wouldn’t have to copy the data to the detail node but just manually update the binding each time the main node changes.

So I think the linkConnected handler is not what I need. However, it seems that I could save the node key in the node data of the detail node and then use diagram.findNodeForKey() to find the main node.

Or you could just share the same object between both nodes, as I suggested in that other topic.

Then I guess I didn’t quite understand your suggestion in the other topic. I’'ve added another reply over there.