# API: Get collection of Speeds and Zones

**URL:** <https://tech-community.robotics.abb.com/t/api-get-collection-of-speeds-and-zones/3578>\
**Category:** RobotStudio\
**Created:** [May 12, 2010, 9:23am UTC](https://tech-community.robotics.abb.com/t/api-get-collection-of-speeds-and-zones/3578 "2010-05-12T09:23:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohannesW](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@JohannesW](https://tech-community.robotics.abb.com/u/JohannesW)\
**Post date:** [May 12, 2010, 9:23am UTC](https://tech-community.robotics.abb.com/t/api-get-collection-of-speeds-and-zones/3578/1 "2010-05-12T09:23:34Z")

</div>

Hello,

how do i get access through the API to the collections of speeds and zones, from which the user can choose active speeddata and active zonedata (picture below).

![](http://forums.robotstudio.com/webwiz/3414/speeddata.gif)

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [June 10, 2010, 5:27pm UTC](https://tech-community.robotics.abb.com/t/api-get-collection-of-speeds-and-zones/3578/2 "2010-06-10T17:27:39Z")

</div>

Hello,

unfortunately there is no method in the RobotStudio API that gives you exactly this information, but the information is available in PC SDK.

You can find the PC SDK dcumentation under RobotStudio 5.13/SDK on the Start Menu.

Here is an example on how to find variables of a certain datatype (from the documentation):

````auto

```
private RapidSymbol[] GetSymbols(string stDataType, bool bSystem)
{
    RapidSymbol[] result = new RapidSymbol[0];
    Task tRob1 = null;
    try
    {
        // Create temporary controller object to get task
        using (Controller c = new Controller())
        {
            tRob1 = c.Rapid.GetTask("T_ROB1");

            if (tRob1 != null)
            {
                RapidSymbolSearchProperties sProps = RapidSymbolSearchProperties.CreateDefault();

                // Setup sProps according to parameter bSystem
                if (bSystem == true)
                {
                    // Search data that the task can see in System scope, e.g. Shared data

                    sProps.GlobalSymbols = true;
                    sProps.InUse = false;
                    sProps.LocalSymbols = false;
                    sProps.Recursive = false;
                    sProps.SearchMethod = SymbolSearchMethod.Scope;
                    sProps.Types = SymbolTypes.Data;
                }
                else
                {
                    // Search Task scope
                    sProps.Types = SymbolTypes.Data;
                    sProps.InUse = false;
                    sProps.SearchMethod = SymbolSearchMethod.Block;                                 
                }

                // Perform the search
                result = tRob1.SearchRapidSymbol(sProps, stDataType, string.Empty);
            }
            else
            {
                // No task to search from
            }
        }
    }
    catch (GeneralException ee)
    {
        // TODO: Add error handling
    }
    catch (System.Exception ee)
    {
        // TODO: Add error handling
    }
    finally
    {
        // Release temporary resources
        if (tRob1 != null)
        {
            tRob1.Dispose();
            tRob1 = null;
        }
    }
    return result;
}
```

```
````

```auto

```

---

<div class="post-metadata">

**Author:** ![JohannesW](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@JohannesW](https://tech-community.robotics.abb.com/u/JohannesW)\
**Post date:** [June 15, 2010, 7:34am UTC](https://tech-community.robotics.abb.com/t/api-get-collection-of-speeds-and-zones/3578/3 "2010-06-15T07:34:08Z")

</div>

thank you,

this works fine.
