Click or drag to resize

RapidSymbolSearchRapidSymbol 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 abstract 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 and functions of data type num declared in task T_ROB1. Name of RapidSymbol and declaring module are added to a listview.
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.Function | SymbolTypes.RapidData;
        sProp.IsInUse = false;
        sProp.SearchMethod = SymbolSearchMethod.Block;

        RapidSymbol[] datas = tT_Rob1.SearchRapidSymbol(sProp,"num",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