Linking tool and add property to the two linked node

So if I use a linking tool to draw a line between two nodes. How am I able to also get the two nodes and add a property?

The “LinkDrawn” DiagramEvent listener is passed one argument whose DiagramEvent.subject will be the newly drawn Link. and

The connected Nodes will be the Link.fromNode and the Link.toNode. If you want to change properties on their model data, just do something like:

$(go.Diagram, "myDiagramDiv",
  { . . .,
    "LinkDrawn": function(e) {
      var link = e.subject;
      var from = link.fromNode;
      var to = link.toNode;
      e.diagram.model.setDataProperty(, "someProperty", ...someValue...);
      e.diagram.model.setDataProperty(, "someProperty", ...someValue...);
    . . .

Thanks. Works well.