RapidSymbolScope Property |
Namespace: ABB.Robotics.Controllers.RapidDomain
private void btnSearch_Click(object sender,EventArgs e) { try { // Create Task if not done if (tT_Rob1 == null) tT_Rob1 = ctrl.Rapid.GetTask("T_ROB1"); RapidSymbolSearchProperties sProp = RapidSymbolSearchProperties.CreateDefault(); sProp.SymbolType = SymbolTypes.RapidData; sProp.IsInUse = false; sProp.SearchMethod = SymbolSearchMethod.Block; RapidSymbol[] datas = tT_Rob1.SearchRapidSymbol(sProp,"num",string.Empty); RapidData rd; foreach (RapidSymbol rs in datas) { rd = rs as RapidData; if (rd != null) { ListViewItem li = new ListViewItem(rd.Name); try { IRapidData iVal = rd.Value; // Get value li.SubItems.Add(iVal.ToString()); } catch { li.SubItems.Add("N/A"); } // [<TASK>,<MODULE>,...] li.SubItems.Add(rd.Scope[1]); // Add item listView1.Items.Add(li); } } catch (System.Exception ee) { // Handle any error here } }