Entity Manager

Most of your interaction with RT3 is performed using the AgRt3EntityManager object. Each entity provider plugin has its own instance of the object assigned to its Entities property during the call to the RegisterEntityProvider method of AgRt3Application. The entity manager is also used to then add queries and event definitions as well as access all of the queries created by the entity provider so far; it is also used to set archiving options for a given provider. For a full list of methods, see RT3 Object Model Reference.

Assuming you have an instance of an entity provider called Provider that has been registered with a call to RegisterEntityProvider, you can then access the AgRt3EntityManager as depicted below:

using AGI.Realtime.Tracking;
AgRt3EntityManager EntityManager = Provider.Entities as AgRt3EntityManager;

Since AgRt3EntityManager implements IAgEntityCollection, you can easily traverse all entities previously inserted by a provider. For example, if you wanted to create a list of all current entity display names from a given provider, you could use the following:

List<string> EntityNames = new List<string>();
foreach(IAgEntity Entity in EntityManager)

If you wanted to see if a particular entity ID was located in the system, you could use the following:

IAgEntity Entity = EntityManager.Find("IDToLookFor");
if(Entity != null)
    //"IDToLookFor" was found
    //"IDToLookFor" was not found

STK 11.2.1 Programming Interface