Hi,
I have a problem when I copy nodes and link.
The json string have two links with same id.
Link with id “idLink”:“4509” is duplicated:
“class”: “go.GraphLinksModel”,
“linkFromPortIdProperty”: “fromPort”,
“linkToPortIdProperty”: “toPort”,
“modelData”: {“position”:"-33.5 -11"},
“nodeDataArray”: [
{“category”:“activity0”, “item”:“generic task”, “key”:“1_195”, “loc”:“392.5 30”, “text”:“MAN 0”, “taskType”:0, “cod”:"", “idDiagramma”:“0”, “idMansione”:“195”},
{“category”:“activity1”, “item”:“generic task”, “key”:“2_196”, “loc”:“272.5 120”, “text”:“MAN 1”, “taskType”:0, “cod”:"", “idDiagramma”:“0”, “idMansione”:“196”},
{“category”:“activity3”, “item”:“generic task”, “key”:“3_197”, “loc”:“122.5 270”, “text”:“MAN 2”, “taskType”:0, “idDiagramma”:“0”, “idMansione”:“197”},
{“category”:“activity4”, “item”:“generic task”, “key”:“4_198”, “loc”:“32.5 390”, “text”:“MAN 3”, “taskType”:0, “idDiagramma”:“0”, “idMansione”:“198”},
{“category”:“activity1”, “item”:“generic task”, “key”:“2_201”, “loc”:“512.5 120”, “text”:“MAN 1”, “taskType”:0, “idDiagramma”:“713”, “idMansione”:“201”, “textColor”:“red”},
{“category”:“activity1”, “item”:“generic task”, “key”:“2_207”, “loc”:“398.82000732421875 227.5”, “text”:“MAN1”, “taskType”:0, “idDiagramma”:“0”, “idMansione”:“207”},
{“category”:“activity1”, “item”:“generic task”, “key”:“2_208”, “loc”:“71.82000732421875 551.5”, “text”:“MAN1”, “taskType”:0, “idDiagramma”:“0”, “idMansione”:“208”},
{“category”:“activity1”, “item”:“generic task”, “key”:“2_2082”, “loc”:“460 530”, “text”:“MAN1”, “taskType”:0, “boundaryEventArray”:[]},
{“category”:“activity4”, “item”:“generic task”, “key”:“4_1982”, “loc”:“770 340”, “text”:“MAN 3”, “taskType”:0, “boundaryEventArray”:[]}
],
“linkDataArray”: [
{“from”:“1_195”, “to”:“2_196”, “fromPort”:“B”, “toPort”:“T”, “idLink”:“2666”, “points”:[392.5,66,392.5,76,392.5,76,324,76,324,68,272.5,68,272.5,64,272.5,84], “lflFrom”:“1”, “lflTo”:“3”},
{“from”:“2_196”, “to”:“3_197”, “fromPort”:“B”, “toPort”:“T”, “idLink”:“2667”, “points”:[272.5,156,272.5,166,272.5,190,122.5,190,122.5,214,122.5,234], “lflFrom”:“4”, “lflTo”:“6”},
{“from”:“3_197”, “to”:“4_198”, “fromPort”:“B”, “toPort”:“T”, “idLink”:“2668”, “points”:[122.5,306,122.5,316,122.5,325,32.5,325,32.5,334,32.5,354], “lflFrom”:“7”, “lflTo”:“9”},
{“from”:“1_195”, “to”:“2_207”, “fromPort”:“B”, “toPort”:“T”, “idLink”:“4508”, “points”:[392.5,66,392.5,76,392.5,123.75,398.82000732,123.75,398.82000732,171.5,398.82000732,191.5], “lflFrom”:“1”, “lflTo”:“20”},
{“from”:“4_198”, “to”:“2_208”, “fromPort”:“B”, “toPort”:“T”, “idLink”:“4509”, “points”:[32.5,426,32.5,436,32.5,465.75,71.82000732,465.75,71.82000732,495.5,71.82000732,515.5], “lflFrom”:“10”, “lflTo”:“26”},
{“from”:“4_1982”, “to”:“2_2082”, “fromPort”:“B”, “toPort”:“T”, “idLink”:“4509”, “points”:[770,376,770,386,770,430,460,430,460,474,460,494], “lflFrom”:“10”, “lflTo”:“26”}
]}
How can i solve this problem?
Sincerely