Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4COM)  1.26.2
IApplications Interface Reference

Inherits IDispatch.

Collaboration diagram for IApplications:
Collaboration graph

Properties

IApplication Item ([in] VARIANT name) [get]
 

Detailed Description

Definition of the IApplications interface which is a collection of IApplication objects.

Use the IApplications interface to get the references of an IApplication object either using the application name or logical application index. With the IApplication, you can only access a specific application. The IApplications class, in contrast, contains methods which influence any application on the device.

Definition at line 73 of file IApplications.idl.

Property Documentation

IApplication IApplications::Item([in] VARIANT name)
get

This property returns an IApplication object given by application name.

Parameters
[in]nameThe name (e.g. "Application") of the application used to get the interface.
[out]ppApplicationReturns the IApplication interface of the given application.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
...
try
{
// if we know the name of our application (e.g. "Application"), then we can simply write:
IApplication application = connection.Logic.Applications["Application"];
// if the application name is unknown we can also retrieve it and
// loop over all application objects.
int numApplications = connection.Logic.GetNumberOfApplications();
Console.WriteLine("Found " + numApplications + " application(s)");
for (int i = 0; i < numApplications; i++)
{
String appName = connection.Logic.GetNameOfApplication(i);
Console.WriteLine("->Application: " + appName);
IApplication app = connection.Logic.Applications[appName];
Console.WriteLine(" State: " + app.GetStateOfApplication().ToString());
}
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method uses the mlpiCore functions mlpiLogicGetNumberOfApplications and mlpiLogicGetNameOfApplication.

The documentation for this interface was generated from the following file: