Hello,
I am adding links to my maps using nxshell.
With the following code the link is not reflecting the Object status.
There is a LinkConfig object but I don't see how it should be applied to the Links:
I am adding links to my maps using nxshell.
With the following code the link is not reflecting the Object status.
Code Select
from java.util import ArrayList
ltype = NetworkMapLink.NORMAL
cd = NetworkMapLink(ltype,4885,4943)
sList = ArrayList()
sList.add(4917)
sList.add(4943)
cd.setStatusObjects(sList)
cd.setRouting(NetworkMapLink.ROUTING_DIRECT)
cd.setColorSource(LinkConfig.COLOR_SOURCE_OBJECT_STATUS)
amap = s.findObjectById(5036)
mapPage = amap.createMapPage()
mapPage.addLink(cd)
data = NXCObjectModificationData(5036)
data.setMapContent(mapPage.getElements(), mapPage.getLinks())
s.modifyObject(data)
There is a LinkConfig object but I don't see how it should be applied to the Links:
Code Select
lc = cd.getConfig()
lc.setColorSource(LinkConfig.COLOR_SOURCE_OBJECT_STATUS)
lc.setObjectStatusList(sList)