Just added this property and it does not seems to be able to find it, tried cleaning, completely removing all event script configs, restarting pc. It finds some widgets but not all?
Im not sure. Are you using WDTC?
Sorry, what is WDTC?
I assume you have an annotation like this in your event script file?
/**
* @eventScriptSetId eventscript_0
* @contentId content_0
*/
if so, please ensure that the contentId matches the content you need. The editor retrieves the widget names from this content, so if this does not match, you get the wrong widget names …
Widget development tool..
Yes it does contain this, it sees other widgets but not all of them on that content.
No, this is a standard toggleswitch widget.
Can you past the XML of the content … and maybe a screenshot of the widgets which are seen in the editor?
So, for others in the BRCommunity, it is an “event script,” a new feature of Map View 6.3.0. This is in the pre-release phase. If anyone has already tested it, feel free to share your thoughts. Elliot, if you do get help here, please use the standard B&R support channels. Thanks, Jaroslav
Here is the widget on the Content editor, and straight after adding a event script on click binding.
As you can see it does find other widgets but some seem to not be discoverable? None of the toggle switches are found
Hmmm.
It should not be needed, but try to save the content - maybe even close and re-open it.
If this does not help, restart Automation Studio.
I have done all of this already, nothing seems to work to get it to recognise some of the widgets on the content. Any other recommendations?
I assume you’re using mapp View 6.3.0. ?
Can you try to rename the widget - and see if it then shows up?
Would be good if you could attach the XML of the content.
Apologies for the late response, here is the Content XML - I already attempted renaming and reloading the project.
<?xml version="1.0" encoding="utf-8"?>
<Content id="Content_Main" guid="a1d6ceee-69dc-4c66-be3c-fd665ad0e346" height="1700" width="1080" xmlns="http://www.br-automation.com/iat2015/contentDefinition/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:types="http://www.br-automation.com/iat2015/widgetTypes/v2">
<Widgets>
<Widget xsi:type="widgets.brease.Label" id="PageHeaderLabel" top="0" left="0" width="1080" height="140" zIndex="0" text="Home" textAlign="center bottom" fontName="RobotoReg" style="header" />
<Widget xsi:type="widgets.brease.TextOutput" id="GroupIdentification" top="150" left="0" width="1080" height="50" zIndex="1" textColor="rgba(255, 255, 255, 1)" textAlign="center top" fontName="RobotoReg" fontSize="20px" />
<Widget xsi:type="widgets.brease.FlyOut" id="FlyOut1" top="0" left="0" width="140" height="400" zIndex="2" buttonOffset="40" docking="right" text="sim" buttonBorderWidth="0px" buttonCornerRadius="5px" buttonBackColor="rgba(37, 37, 37, 1)" cornerRadius="10px" backColor="rgba(37, 37, 37, 1)" textColor="rgba(255, 255, 255, 0.3)" fontSize="16px" fontName="RobotoReg">
<Widgets>
<Widget xsi:type="widgets.brease.FlexLayoutPanel" id="FlexLayoutPanel1" top="0" left="0" width="140" height="400" zIndex="0" alignment="vertical" margin="0px" padding="0px">
<Widgets>
<Widget xsi:type="widgets.brease.MomentaryPushButton" id="MomentaryPushButton1" top="0" left="0" zIndex="0" text="Start" margin="20px" />
<Widget xsi:type="widgets.brease.MomentaryPushButton" id="MomentaryPushButton2" top="0" left="0" zIndex="1" text="Stop" margin="20px" />
<Widget xsi:type="widgets.brease.MomentaryPushButton" id="MomentaryPushButton3" top="0" left="0" zIndex="2" text="Reset" padding="10px" margin="20px" />
<Widget xsi:type="widgets.brease.ToggleSwitch" id="ToggleSwitch1" top="0" left="0" zIndex="3" text="Safety" padding="5px" margin="20px" />
<Widget xsi:type="widgets.brease.MomentaryPushButton" id="MomentaryPushButton4" top="0" left="0" zIndex="4" text="Home" padding="10px" margin="20px" />
</Widgets>
</Widget>
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.ToggleButton" id="OutputTrendOptionsToggle" top="1330" left="940" width="40" height="40" zIndex="16" text="..." cornerRadius="100px" />
<Widget xsi:type="widgets.brease.GroupBox" id="RobotPPMChartGB" top="1000" left="80" width="900" height="270" zIndex="4" text="Robots Pick Performance" headerBackColor="rgba(255, 255, 255, 0)" style="container">
<Widgets>
<Widget xsi:type="widgets.brease.OnlineChartHDA" id="RobotPickPerformanceTrend" top="10" left="0" width="900" height="250" zIndex="0" maxTimeDeviation="1000" updateBufferTime="1000" updateChartTime="1000" borderColor="rgba(0, 0, 0, 0)" borderStyle="none" backColor="rgba(219, 219, 219, 0)" chartColor="rgba(255, 255, 255, 0)">
<Properties>
<yAxis>
<Element id="yAxis1" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1},'imperial':{'decimalPlaces':1,'minimumIntegerDigits':1},'imperial-us':{'decimalPlaces':1,'minimumIntegerDigits':1}}" showUnit="false" textColor="rgba(255, 255, 255, 1)" gridColor="rgba(50, 50, 50, 1)" fontSize="14px" fontName="RobotoReg" titleTextColor="rgba(255, 255, 255, 1)" titleFontSize="14px" titleFontName="RobotoReg" />
</yAxis>
<xAxis>
<Element id="xAxis1" numberOfTicks="6" timeSpan="3600" gridColor="rgba(50, 50, 50, 1)" color="rgba(0, 0, 0, 1)" textColor="rgba(255, 255, 255, 1)" fontName="RobotoReg" fontSize="14px" />
</xAxis>
<graph>
<Element id="robot1pickrate" yAxisReference="yAxis1" lineWidth="2px" />
<Element id="robot2pickrate" yAxisReference="yAxis1" lineColor="rgba(45, 85, 255, 1)" lineWidth="2px" />
<Element id="robot3pickrate" yAxisReference="yAxis1" lineColor="rgba(0, 225, 0, 1)" lineWidth="2px" />
<Element id="robot4pickrate" yAxisReference="yAxis1" lineColor="rgba(218, 165, 32, 1)" lineWidth="2px" />
</graph>
<cursor>
<Element id="cursor1" fontName="RobotoReg" fontSize="16px" />
</cursor>
</Properties>
</Widget>
<Widget xsi:type="widgets.brease.NumericOutput" id="totalPickPerformanceOutput2" top="2" left="365" width="170" height="31" zIndex="1" unit="{'metric':'59','imperial':'59','imperial-us':'59'}" unitAlign="right" textAlign="center" bold="false" padding="10px 10px 20px 10px" style="trendValue" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.GroupBox" id="DiagramGroupBox" top="210" left="315" width="450" height="450" zIndex="5" borderWidth="0px">
<Widgets>
<Widget xsi:type="widgets.brease.Ellipse" id="RearCentreEstop" top="31" left="208" width="26" height="26" zIndex="5" borderWidth="4px" lineColor="rgba(255, 255, 0, 1)" style="ButtonStopOff" visible="false" />
<Widget xsi:type="widgets.brease.Ellipse" id="FrontCentreEstop" top="378" left="208" width="26" height="26" zIndex="6" borderWidth="4px" lineColor="rgba(255, 255, 0, 1)" style="ButtonStopOff" visible="false" />
<Widget xsi:type="widgets.brease.Ellipse" id="FrontSideEstop" top="378" left="401" width="26" height="26" zIndex="7" borderWidth="4px" lineColor="rgba(255, 255, 0, 1)" style="ButtonStopOff" visible="false" />
<Widget xsi:type="widgets.brease.Rectangle" id="Door1" top="372" left="42" width="164" height="19" zIndex="1" borderWidth="2px" cornerRadius="3px" style="Door_Error" />
<Widget xsi:type="widgets.brease.Rectangle" id="Door2" top="372" left="236" width="164" height="19" zIndex="2" borderStyle="solid" borderWidth="2px" cornerRadius="3px" style="Door_Error" />
<Widget xsi:type="widgets.brease.Rectangle" id="Door3" top="42" left="42" width="164" height="19" zIndex="3" borderStyle="solid" borderWidth="2px" cornerRadius="3px" style="Door_Error" />
<Widget xsi:type="widgets.brease.Rectangle" id="Door4" top="42" left="236" width="164" height="19" zIndex="4" borderStyle="solid" borderWidth="2px" cornerRadius="3px" style="Door_Error" />
<Widget xsi:type="widgets.brease.Label" id="hmi-label" top="398" left="9" width="40" zIndex="8" text="HMI" textAlign="center" />
<Widget xsi:type="widgets.brease.Image" id="Image1" top="-2" left="-1" width="450" height="452" zIndex="0" image="Media/HMI_Graphics/Baghera/CroppedGroupDiagram.png" rotation="180deg" />
<Widget xsi:type="widgets.brease.Ellipse" id="robot_3_indicator" top="119" left="83" width="60" height="60" zIndex="12" borderWidth="6px" style="Robot_Disabled" />
<Widget xsi:type="widgets.brease.Ellipse" id="robot_2_indicator" top="119" left="233" width="60" height="60" zIndex="11" borderWidth="6px" style="Robot_Disabled" />
<Widget xsi:type="widgets.brease.Ellipse" id="robot_4_indicator" top="249" left="149" width="60" height="60" zIndex="10" borderWidth="6px" style="Robot_Disabled" />
<Widget xsi:type="widgets.brease.Ellipse" id="robot_1_indicator" top="251" left="297" width="60" height="60" zIndex="9" borderWidth="6px" style="Robot_Disabled" />
<Widget xsi:type="widgets.brease.Label" id="hmi-label2" top="129" left="243" width="40" height="40" zIndex="13" text="2" borderWidth="4px" cornerRadius="100px" backColor="rgba(255, 255, 255, 0)" borderColor="rgba(30, 144, 255, 1)" borderStyle="outset" textColor="rgba(255, 255, 255, 1)" textAlign="center" fontSize="24px" />
<Widget xsi:type="widgets.brease.Label" id="hmi-label3" top="259" left="159" width="40" height="40" zIndex="14" text="3" borderWidth="4px" cornerRadius="100px" backColor="rgba(255, 255, 255, 0)" borderColor="rgba(127, 255, 0, 1)" borderStyle="outset" textColor="rgba(255, 255, 255, 1)" textAlign="center" fontSize="24px" />
<Widget xsi:type="widgets.brease.Label" id="hmi-label4" top="129" left="93" width="40" height="40" zIndex="15" text="4" borderWidth="4px" cornerRadius="100px" backColor="rgba(0, 0, 0, 1)" borderColor="rgba(255, 215, 0, 1)" borderStyle="outset" textColor="rgba(255, 255, 255, 1)" textAlign="center" fontSize="24px" />
<Widget xsi:type="widgets.brease.Label" id="ShowLegend" top="410" left="410" width="30" zIndex="16" text="i" cornerRadius="100px" backColor="rgba(30, 144, 255, 1)" textColor="rgba(18, 18, 18, 1)" fontSize="20px" bold="true" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.GroupBox" id="TotalOutputGB" top="1310" left="80" width="900" height="340" zIndex="6" text="Total Output" headerBackColor="rgba(255, 255, 255, 0)" style="container">
<Widgets>
<Widget xsi:type="widgets.brease.OnlineChartHDA" id="TotalOutputTrend" top="10" left="0" width="900" height="320" zIndex="0" maxTimeDeviation="1000" updateBufferTime="1000" updateChartTime="1000" borderColor="rgba(0, 0, 0, 0)" borderStyle="none" backColor="rgba(219, 219, 219, 0)" chartColor="rgba(255, 255, 255, 0)">
<Properties>
<yAxis>
<Element id="yAxis1" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1},'imperial':{'decimalPlaces':1,'minimumIntegerDigits':1},'imperial-us':{'decimalPlaces':1,'minimumIntegerDigits':1}}" showUnit="false" textColor="rgba(255, 255, 255, 1)" gridColor="rgba(50, 50, 50, 1)" fontSize="14px" fontName="RobotoReg" titleTextColor="rgba(255, 255, 255, 1)" titleFontSize="14px" titleFontName="RobotoReg" max="400" />
</yAxis>
<xAxis>
<Element id="xAxis1" numberOfTicks="6" timeSpan="3600" gridColor="rgba(50, 50, 50, 1)" color="rgba(0, 0, 0, 1)" textColor="rgba(255, 255, 255, 1)" fontName="RobotoReg" fontSize="14px" />
</xAxis>
<graph>
<Element id="totalMachineOutput" yAxisReference="yAxis1" lineColor="rgba(148, 0, 211, 1)" lineWidth="2px" />
</graph>
<cursor>
<Element id="cursor1" fontName="RobotoReg" fontSize="16px" />
</cursor>
</Properties>
</Widget>
<Widget xsi:type="widgets.brease.NumericOutput" id="totalPickPerformanceOutput3" top="2" left="365" width="170" height="31" zIndex="1" unit="{'metric':'59','imperial':'59','imperial-us':'59'}" unitAlign="right" textAlign="center" bold="false" padding="10px 10px 20px 10px" style="trendValue" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.GroupBox" id="TotalSupplyRateGB" top="690" left="80" width="900" height="270" zIndex="7" text="Total Supply Rate" headerBackColor="rgba(255, 255, 255, 0)" style="container">
<Widgets>
<Widget xsi:type="widgets.brease.OnlineChartHDA" id="TotalSupplyRateTrend" top="10" left="0" width="900" height="250" zIndex="0" maxTimeDeviation="1000" updateBufferTime="1000" updateChartTime="1000" borderColor="rgba(0, 0, 0, 0)" borderStyle="none" backColor="rgba(219, 219, 219, 0)" chartColor="rgba(255, 255, 255, 0)">
<Properties>
<yAxis>
<Element id="yAxis1" format="{'metric':{'decimalPlaces':0,'minimumIntegerDigits':1},'imperial':{'decimalPlaces':1,'minimumIntegerDigits':1},'imperial-us':{'decimalPlaces':1,'minimumIntegerDigits':1}}" showUnit="false" textColor="rgba(255, 255, 255, 1)" gridColor="rgba(50, 50, 50, 1)" fontSize="14px" fontName="RobotoReg" titleTextColor="rgba(255, 255, 255, 1)" titleFontSize="14px" titleFontName="RobotoReg" />
</yAxis>
<xAxis>
<Element id="xAxis1" numberOfTicks="6" timeSpan="3600" gridColor="rgba(50, 50, 50, 1)" color="rgba(0, 0, 0, 1)" textColor="rgba(255, 255, 255, 1)" fontName="RobotoReg" fontSize="14px" />
</xAxis>
<graph>
<Element id="total-supply-rate" yAxisReference="yAxis1" lineColor="rgba(50, 205, 50, 1)" lineWidth="2px" />
</graph>
<cursor>
<Element id="cursor1" fontName="RobotoReg" fontSize="16px" />
</cursor>
</Properties>
</Widget>
<Widget xsi:type="widgets.brease.NumericOutput" id="totalPickPerformanceOutput1" top="2" left="365" width="170" height="31" zIndex="1" unitAlign="right" textAlign="center" bold="false" padding="10px 10px 20px 10px" style="trendValue" />
</Widgets>
</Widget>
<Widget xsi:type="widgets.brease.ToggleButton" id="FreezeSupplyRateTrend" top="710" left="890" width="40" height="40" zIndex="8" image="Media/HMI_Graphics/Vector/Freeze%20Icon.svg" imageHeight="30" imageWidth="60" borderWidth="0px" cornerRadius="50px" backColor="rgba(128, 128, 128, 0.5)" mouseDownBackColor="rgba(30, 144, 255, 1)" padding="0px" checkedBackColor="rgba(29, 161, 242, 0.5)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="FreezeOutputTrend" top="1330" left="890" width="40" height="40" zIndex="10" image="Media/HMI_Graphics/Vector/Freeze%20Icon.svg" imageHeight="30" imageWidth="60" borderWidth="0px" cornerRadius="50px" backColor="rgba(128, 128, 128, 0.5)" mouseDownBackColor="rgba(30, 144, 255, 1)" padding="0px" checkedBackColor="rgba(29, 161, 242, 0.5)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="RobotTrendOptionsToggle" top="1020" left="940" width="40" height="40" zIndex="15" text="..." cornerRadius="100px" />
<Widget xsi:type="widgets.brease.ToggleButton" id="Robot3VisibleToggle" top="1020" left="770" width="40" height="40" zIndex="13" text="3" value="true" imageHeight="35" imageWidth="60" borderStyle="outset" borderWidth="4px" cornerRadius="50px" backColor="rgba(0, 0, 0, 0)" borderColor="rgba(30, 30, 30, 1)" textColor="rgba(255, 255, 255, 1)" mouseDownBorderWidth="4px" mouseDownBackColor="rgba(128, 128, 128, 1)" fontSize="24px" padding="0px" checkedBackColor="rgba(0, 0, 0, 0)" checkedTextColor="rgba(255, 255, 255, 1)" checkedBorderColor="rgba(127, 255, 0, 1)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="Robot2VisibleToggle" top="1020" left="720" width="40" height="40" zIndex="12" text="2" value="true" imageHeight="35" imageWidth="60" borderStyle="outset" borderWidth="4px" cornerRadius="50px" backColor="rgba(0, 0, 0, 0)" borderColor="rgba(30, 30, 30, 1)" textColor="rgba(255, 255, 255, 1)" mouseDownBorderWidth="4px" mouseDownBackColor="rgba(128, 128, 128, 1)" fontSize="24px" padding="0px" checkedBackColor="rgba(0, 0, 0, 0)" checkedTextColor="rgba(255, 255, 255, 1)" checkedBorderColor="rgba(30, 144, 255, 1)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="Robot1VisibleToggle" top="1020" left="670" width="40" height="40" zIndex="11" text="1" value="true" imageHeight="35" imageWidth="60" borderStyle="outset" borderWidth="4px" cornerRadius="50px" backColor="rgba(0, 0, 0, 0)" borderColor="rgba(30, 30, 30, 1)" textColor="rgba(255, 255, 255, 1)" mouseDownBorderWidth="4px" mouseDownBackColor="rgba(128, 128, 128, 1)" fontSize="24px" padding="0px" checkedBackColor="rgba(0, 0, 0, 0)" checkedTextColor="rgba(255, 255, 255, 1)" checkedBorderColor="rgba(255, 0, 0, 1)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="Robot4VisibleToggle" top="1020" left="820" width="40" height="40" zIndex="14" text="4" value="true" imageHeight="35" imageWidth="60" borderStyle="outset" borderWidth="4px" cornerRadius="50px" backColor="rgba(0, 0, 0, 0)" borderColor="rgba(30, 30, 30, 1)" textColor="rgba(255, 255, 255, 1)" mouseDownBorderWidth="4px" mouseDownBackColor="rgba(128, 128, 128, 1)" fontSize="24px" padding="0px" checkedBackColor="rgba(0, 0, 0, 0)" checkedTextColor="rgba(255, 255, 255, 1)" checkedBorderColor="rgba(255, 215, 0, 1)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="FreezeRobotTrendBtn" top="1020" left="890" width="40" height="40" zIndex="9" image="Media/HMI_Graphics/Vector/Freeze%20Icon.svg" imageHeight="30" imageWidth="60" borderWidth="0px" cornerRadius="50px" backColor="rgba(128, 128, 128, 0.5)" mouseDownBackColor="rgba(30, 144, 255, 1)" padding="0px" checkedBackColor="rgba(29, 161, 242, 0.5)" />
<Widget xsi:type="widgets.brease.ToggleButton" id="SupplyRateTrendOptionsToggle" top="710" left="940" width="40" height="40" zIndex="17" text="..." cornerRadius="100px" />
<Widget xsi:type="widgets.brease.BasicSlider" id="SupplyTrendTimeSlider" top="700" left="90" height="20" zIndex="18" maxValue="3600" minValue="60" value="3600" thumbColor="rgba(50, 205, 50, 1)" visible="false" />
<Widget xsi:type="widgets.brease.BasicSlider" id="RobotTrendTimeSlider" top="1010" left="90" height="20" zIndex="19" maxValue="3600" minValue="60" value="3600" thumbColor="rgba(30, 144, 255, 1)" visible="false" />
<Widget xsi:type="widgets.brease.BasicSlider" id="OutputTrendTimeSlider" top="1324" left="90" height="20" zIndex="20" maxValue="3600" minValue="60" value="3600" thumbColor="rgba(153, 50, 204, 1)" visible="false" />
<Widget xsi:type="widgets.brease.Label" id="hmi-label1" top="471" left="622" width="40" height="40" zIndex="21" text="1" borderWidth="4px" cornerRadius="100px" backColor="rgba(255, 255, 255, 0)" borderColor="rgba(255, 0, 0, 1)" borderStyle="outset" textColor="rgba(255, 255, 255, 1)" textAlign="center" fontSize="24px" italic="false" />
</Widgets>
</Content>
Perfect.
I think I identified your issue. You have label widget with name “hmi-label” on your content.
If you remove the dash, it seems every widget is found by the editor.
Need to check with the developers.
In any case:
If you want to use scripting, you cannot use a dash in your widget names, as the widget names map 1:1 to “object names” in the script … JavaScript does however not allow dashes in identifiers.
Ah that’s great thankyou, good spot.