Below is the example of using the SetWspMd operation for creating a connecting line bending point. The request contains point creation parameters. The response contains information about workspace shapes. A list of all points, through which a connecting line goes (the pnts field) will be obtained for a connecting line.
{
"SetWspMd" :
{
"tWsp" :
{
"id" : "CIMJHKLEBJECGOAEDDAIHBNBMCJPBEIEDLDBMALGIAOFGHDO!M!S!WSPMCLOGNLEBJECGOAEIIMMCOLKFIOGIGNEPLNLFCEAJGEIEIBG"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"action" :
{
"InsertLinkPoint" : "true"
}
},
"meta" :
{
"InsertLinkPoint" :
{
"shapeId" : "Shape4",
"index" : "1",
"point" :
{
"x" : "10",
"y" : "20"
}
}
},
"metaGet" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"getShapes2" : "true"
}
}
}
}
{
"SetWspMdResult" :
{
"id" :
{
"id" : "CIMJHKLEBJECGOAEDDAIHBNBMCJPBEIEDLDBMALGIAOFGHDO!M!S!WSPMCLOGNLEBJECGOAEIIMMCOLKFIOGIGNEPLNLFCEAJGEIEIBG"
},
"meta" :
{
"shapes2" :
{
"its" :
{
"it" :
[
{
"cld" :
{
"its" : ""
},
"Id" : "Shape1",
"s" :
{
"Id" : "Style2",
"pvt" : "1",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#000000",
"lpt" : "100",
"lpst" : "Solid",
"lpw" : "0.25",
"lpcz" : "3",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "None",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Bottom",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Near",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"ss" :
{
"Id" : "Selection",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#000000",
"lpt" : "100",
"lpst" : "Solid",
"lpw" : "0.25",
"lpcz" : "3",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "None",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Bottom",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Near",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"p" :
{
"@W" : "32",
"@H" : "32",
"$" : "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC\/xhBQAAAAlwSFlzAAAOvAAADrwBlbxySQAAAehJREFUWEftl8FtwkAQRSmBDoy8MlwpISVQAI4pgRJcAS7BR6NcOICVI8co8SElUIIPAeVI9s96CZjZwRBASpQvPUHwzrwR2F6n9Z9fm15SPASTt2U3KbZ4xd\/VodsmSF5HVlwHn+N4tfS6MeJixYnrYN1VBvGS93aQFHFTcR0zSBGjT9WyWay4O3krucZno\/s0HgQn09XEdXTfRidrL3npdCdFyja5FN0PfSuFO2oRrvzFkE6gH\/8Uta9+nfmj9VSt8N4ZlT9uCT2IysPYm0VtO8h5V4ERlzOvvclUDPFmqragUvHZDbAjLO0gOC5djkZsLj8r1pRWfOEAB6Tec0S\/oxnk+05oxZ+Z19GStC7dB+ucYaQcabCI+lhvT6z1U9DXzUWxBeudYWRO\/DxcomYz9ZecyAWJXOFEEqjhJBIkcoWTSKCGk0iQyBVOIoEaTiJBIlc4iQRqOIkEiVzhJBKo4SQSJHKFk0ighpNIkMgVTiKBGk4iQSJXOIkEajiJBIlcwa1WN07NHsBL90ENJznC7AkpbtUkOhVsPtiETg2CtUeyfSDWmxI2J2p8bjCIPw\/HZntuPoDZfv3xxWIueFCpD4LP62I8eFDBraLy4QAb0eEAtCENaMG9ouYRPWB+ZOo+\/xX9wbRaXy856gGC0IrxAAAAAElFTkSuQmCC"
},
"tc" : "",
"pp" :
{
"x" : "-84.55207061767578",
"y" : "-27.96145439147949"
},
"ppc" :
{
"x" : "0.5",
"y" : "0.5"
},
"sz" :
{
"width" : "29.10416412353516",
"height" : "24.07708168029785"
},
"a" : "0",
"txt" : "Express report",
"tvo" : "0",
"tho" : "0",
"gb" : "ScaleWithGroup",
"c" : "OverShape",
"t" :
{
"v" : ""
},
"cs" : "",
"ai" : "511",
"ms" :
{
"width" : "0",
"height" : "0"
},
"lv" : "14",
"r" :
{
"left" : "-99.10415649414063",
"top" : "-39.99999618530273",
"width" : "29.10416412353516",
"height" : "24.07708168029785"
},
"rar" :
{
"left" : "1.865518569946289",
"top" : "14.30127906799316",
"width" : "25.37312698364258",
"height" : "3.941190719604492"
},
"v" : "1",
"st" : "Rectangle"
},
{
"cld" :
{
"its" : ""
},
"Id" : "Shape2",
"s" :
{
"Id" : "Normal",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"ss" :
{
"Id" : "Selection",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"p" : "",
"tc" : "",
"pp" :
{
"x" : "-34.99999618530273",
"y" : "-30.00000381469727"
},
"ppc" :
{
"x" : "0.5",
"y" : "0.5"
},
"sz" :
{
"width" : "30",
"height" : "20"
},
"a" : "0",
"txt" : "",
"tvo" : "0",
"tho" : "0",
"gb" : "ScaleWithGroup",
"c" : "OverShape",
"t" :
{
"v" : ""
},
"cs" :
{
"it" :
{
"Key" : "2",
"Value" :
{
"index" : "0",
"shapeId" : "Shape4"
}
}
},
"ai" : "511",
"ms" :
{
"width" : "0",
"height" : "0"
},
"lv" : "14",
"r" :
{
"left" : "-49.99999618530273",
"top" : "-40.00000381469727",
"width" : "30",
"height" : "20"
},
"rar" :
{
"left" : "15",
"top" : "10",
"width" : "0",
"height" : "0"
},
"v" : "1",
"st" : "Rectangle"
},
{
"cld" :
{
"its" : ""
},
"Id" : "Shape3",
"s" :
{
"Id" : "Normal",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"ss" :
{
"Id" : "Selection",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"p" : "",
"tc" : "",
"pp" :
{
"x" : "4.999993324279785",
"y" : "-9.999996185302734"
},
"ppc" :
{
"x" : "0.5",
"y" : "0.5"
},
"sz" :
{
"width" : "30",
"height" : "20"
},
"a" : "0",
"txt" : "",
"tvo" : "0",
"tho" : "0",
"gb" : "ScaleWithGroup",
"c" : "OverShape",
"t" :
{
"v" : ""
},
"cs" :
{
"it" :
{
"Key" : "3",
"Value" :
{
"index" : "1",
"shapeId" : "Shape4"
}
}
},
"ai" : "511",
"ms" :
{
"width" : "0",
"height" : "0"
},
"lv" : "14",
"r" :
{
"left" : "-10.00000667572021",
"top" : "-19.99999618530273",
"width" : "30",
"height" : "20"
},
"rar" :
{
"left" : "15",
"top" : "10",
"width" : "0",
"height" : "0"
},
"v" : "1",
"st" : "Ellipse"
},
{
"cld" :
{
"its" : ""
},
"Id" : "Shape4",
"s" :
{
"Id" : "Normal",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"ss" :
{
"Id" : "Selection",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"p" : "",
"tc" : "",
"pp" :
{
"x" : "-4.999998092651367",
"y" : "-5.000001907348633"
},
"ppc" :
{
"x" : "0",
"y" : "0"
},
"sz" :
{
"width" : "29.99999618530273",
"height" : "50.00000381469727"
},
"a" : "50.1944465637207",
"txt" : "",
"tvo" : "0",
"tho" : "0",
"gb" : "ScaleWithGroup",
"c" : "OverShape",
"t" :
{
"v" : ""
},
"cs" :
{
"it" :
[
{
"Key" : "0",
"Value" :
{
"index" : "2",
"shapeId" : "Shape2"
}
},
{
"Key" : "1",
"Value" :
{
"index" : "3",
"shapeId" : "Shape3"
}
}
]
},
"ai" : "511",
"ms" :
{
"width" : "0",
"height" : "0"
},
"lv" : "14",
"r" :
{
"left" : "-33.80829620361328",
"top" : "-9.481288909912109",
"width" : "57.61660003662109",
"height" : "8.962566375732422"
},
"rar" :
{
"left" : "-4.999998092651367",
"top" : "-5.000001907348633",
"width" : "0",
"height" : "0"
},
"v" : "1",
"st" : "Link"
}
]
}
},
"links" :
{
"its" :
{
"it" :
[
{
"cld" :
{
"its" : ""
},
"Id" : "Shape4",
"s" :
{
"Id" : "Normal",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"ss" :
{
"Id" : "Selection",
"pvt" : "0",
"fnt" : "Arial",
"fsz" : "10",
"fbl" : "0",
"fit" : "0",
"fun" : "0",
"fso" : "0",
"fbc" : "#000000",
"fbt" : "0",
"lpc" : "#8B9097",
"lpt" : "0",
"lpst" : "Solid",
"lpw" : "0.3533568978309631",
"lpcz" : "2",
"pbc" : "Flat",
"pec" : "Flat",
"bfc" : "#FFFFFF",
"bft" : "0",
"bbp" : "Solid",
"bbc" : "#000000",
"bbt" : "0",
"sbfc" : "#000000",
"sbft" : "0",
"sbp" : "None",
"sbc" : "#FFFFFF",
"sbt" : "0",
"tbc" : "#FFFFFF",
"tbt" : "100",
"tp" : "Over",
"tah" : "Center",
"tav" : "Center",
"tml" : "0",
"tmt" : "0",
"tmr" : "0",
"tmb" : "0",
"pt" : "0",
"pah" : "Center",
"pav" : "Center",
"pml" : "0",
"pmt" : "0",
"pmr" : "0",
"pmb" : "0",
"am" : "None",
"ww" : "BreakWords",
"pp" : "0",
"ps" : "0",
"pas" : "0"
},
"p" : "",
"tc" : "",
"pp" :
{
"x" : "-4.999998092651367",
"y" : "-5.000001907348633"
},
"ppc" :
{
"x" : "0",
"y" : "0"
},
"sz" :
{
"width" : "29.99999618530273",
"height" : "50.00000381469727"
},
"a" : "50.1944465637207",
"txt" : "",
"tvo" : "0",
"tho" : "0",
"gb" : "ScaleWithGroup",
"c" : "OverShape",
"t" :
{
"v" : ""
},
"cs" :
{
"it" :
[
{
"Key" : "0",
"Value" :
{
"index" : "2",
"shapeId" : "Shape2"
}
},
{
"Key" : "1",
"Value" :
{
"index" : "3",
"shapeId" : "Shape3"
}
}
]
},
"ai" : "511",
"ms" :
{
"width" : "0",
"height" : "0"
},
"lv" : "14",
"r" :
{
"left" : "-33.80829620361328",
"top" : "-9.481288909912109",
"width" : "57.61660003662109",
"height" : "8.962566375732422"
},
"rar" :
{
"left" : "-4.999998092651367",
"top" : "-5.000001907348633",
"width" : "0",
"height" : "0"
},
"v" : "1",
"st" : "Link",
"fpa" : "1",
"lpa" : "1",
"fp" :
{
"x" : "-19.99999618530273",
"y" : "-30.00000381469727"
},
"lp" :
{
"x" : "4.999993324279785",
"y" : "3.814697265625e-06"
},
"pnts" :
{
"it" :
[
{
"x" : "-19.99999618530273",
"y" : "-30.00000381469727"
},
{
"x" : "10",
"y" : "20"
},
{
"x" : "4.999993324279785",
"y" : "3.814697265625e-06"
}
]
}
}
]
}
},
"ZOrderShapeMap" :
{
"it" :
[
{
"Key" : "0",
"Value" : "Shape1"
},
{
"Key" : "1",
"Value" : "Shape3"
},
{
"Key" : "2",
"Value" : "Shape2"
},
{
"Key" : "3",
"Value" : "Shape4"
}
]
}
}
}
}
public static SetWspMdResult WspCreateLinkPoint(string moniker, string linkId, int indexPoint, PointF newPoint)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetWspMd()
{
tArg = new SetWspMdArg()
{
pattern = new WspMdPattern()
{
action = new IWrspWorkspaceAction()
{
InsertLinkPoint = true
}
},
meta = new WspMd()
{
InsertLinkPoint = new WspInsertPointArgs()
{
shapeId = linkId,
index = indexPoint,
point = newPoint
}
},
metaGet = new WspMdPattern()
{
getShapes2 = true
}
},
tWsp = new WspId() { id = moniker }
};
// Add a connecting line bending point
var tResult = somClient.SetWspMd(tSet);
return tResult;
}
See also: