NetXMS Support Forum

English Support => General Support => Topic started by: gmonk63 on February 14, 2025, 05:43:22 PM

Title: Link Style Script
Post by: gmonk63 on February 14, 2025, 05:43:22 PM
Are there any examples of link style scripts ?   Im not sure  If this would be the right place to do this but I would like to highlight/color  a interface/ link based on if the STP status is in a blocking state.  I would like to highlight the interface and change the color of the link to signify that a layer2 loop is broken here in the Ring



Thanks  
Title: Re: Link Style Script
Post by: Tatjana Dubrovica on February 17, 2025, 04:17:08 PM
Hi,
Yes you can use link styling script. 
Here you can see example that I use for automatic integration tests: https://github.com/netxms/netxms/blob/master/tests/integration/src/test/resources/networkMapStylingScript.nxsl
Basically you should get STP status form $link.object1 nad $link.object2 (It will be NetObjects or Nodes connected by the link https://netxms.org/documentation/nxsl-latest/#class-node )
and set color with help of:
$link.setColorConfig(MapLinkColorSource::CustomColor, "#FF00FF");
Title: Re: Link Style Script
Post by: gmonk63 on March 07, 2025, 04:56:40 PM
Perfect !! Thank you for the info