Thanks again for the help walter!
If anyone needs an example of what walter meant when he said to bind to the link layer, here it is:
// define the Link template
Diagram.linkTemplate =
graphObjectMake(go.Link, // the whole link panel
new go.Binding(“layerName”, “layerName”),
{ selectable: false }, //link will not be selectable
graphObjectMake(go.Shape,
{
name: “LINKSHAPE”,
stroke: “black”,
strokeWidth: 1
}
));
var links = Diagram.links;
var link;
while (links.next())
{
link = links.value;
setLinkLayer(link, “theLayer”);
}
}
function setLinkLayer(link, layerName)
{
link.layerName = layerName;
}