Support Board
Date/Time: Thu, 28 Nov 2024 13:45:15 +0000
Post From: ACS Button To Control Spreadsheet Subgraph
[2023-04-29 12:44:08] |
User483852 - Posts: 16 |
Never mind, I got the solution using the code below: SCSFExport scsf_ACSButtonOutputOnEnable(SCStudyGraphRef sc) { sc.GraphName = "ACS Button Output On Enable"; sc.StudyDescription = "Sends an output when the ACS button is enabled."; int value = sc.GetCustomStudyControlBarButtonEnableState(1); //Get the status of the control bar button sc.Subgraph[0].Name="Button Number"; sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE; sc.Subgraph[0].LineStyle = LINESTYLE_DOT; sc.Subgraph[0].PrimaryColor = RGB(0,255,0); sc.Subgraph[1].Name="Button Status"; sc.Subgraph[1].DrawStyle = DRAWSTYLE_LINE; sc.Subgraph[1].LineStyle = LINESTYLE_DOT; sc.Subgraph[1].PrimaryColor = RGB(255, 0, 0); sc.Subgraph[1].DisplayNameValueInDataLine=1; sc.Input[0].Name = "ACS Control Bar Button Number"; sc.Input[0].SetInt(1); sc.Input[1].Name = "Button Status"; sc.Input[1].SetInt(value); sc.FreeDLL=0; // 1 for dev else 0 int barstatus = sc.Input[1].GetInt(); for (int i = sc.UpdateStartIndex; i < sc.ArraySize; i++) { sc.Subgraph[1] = barstatus; } return; }; |