Click or drag to resize

RapidDataSearchRapidSymbol Method

General RapidSymbol search method.

Namespace:  ABB.Robotics.Controllers.RapidDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public override RapidSymbol[] SearchRapidSymbol(
	RapidSymbolSearchProperties sProps,
	string stDataType,
	string stRegex
)

Parameters

sProps
Type: ABB.Robotics.Controllers.RapidDomainRapidSymbolSearchProperties
Instance of RapidSymbolSearchProperties with the search properties
stDataType
Type: SystemString
Name of the datatype to search for. Use string.Empty if not of interest.
stRegex
Type: SystemString
The regular expression to search after. Use string.Empty if not of interest.

Return Value

Type: RapidSymbol
An array of RapidSymbol. If no RapidSymbol an array of lenght zero is returned.
Exceptions
ExceptionCondition
GeneralExceptionA General Exception has occurred.
Examples
This example retrieves all RAPID data instances in use in the scope of the RapidData argument. The returned instances are added to a listview.
private void ListSurroundingRapidData(RapidData rd)
{
    try
    {
        // Create Task if not done

        RapidSymbolSearchProperties sProp = 
            RapidSymbolSearchProperties.CreateDefault();
            sProp.SymbolType = SymbolTypes.RapidData;
            sProp.IsInUse = true;
            sProp.SearchMethod = SymbolSearchMethod.Scope;

            RapidSymbol[] datas = rd.SearchRapidSymbol(sProp,string.Empty,string.Empty);

        foreach (RapidSymbol rs in datas)
        {
            ListViewItem li = new ListViewItem(rs.Name);

            // [<TASK>,<MODULE>,...]
            li.SubItems.Add(rs.Scope[1]);

            // Add item
            listView1.Items.Add(li);
        }
    }
    catch (System.Exception ee)
    {
        // Handle any error here
    }
}
See Also