FlexPendant TpsView attribute |
A custom FlexPendant application must implement the assembly attribute TpsView. For example, it is used to determine the visual appearance of the application in the ABB menu. The TpsView attribute is auto generated and located before the namespace definition in the application View class, that is, the class that displays the first view of a FlexPendant SDK application.
In this section all parameters of the TpsView attribute will be detailed.
Project wizard settingsThe TpsView attribute is auto generated according to your settings in the FlexPendant SDK Project Wizard in Visual Studio:
In C# the settings of the figure will render this code:
[assembly: TpsView("MyApplicationName", "tpu-Operator32.gif", "tpu-Operator16.gif", "TpsViewHelloWorld.dll", "TpsViewHelloWorld.TpsViewHelloWorld", StartPanelLocation.Left, TpsViewType.Static, StartupType = TpsViewStartupTypes.Manual)]
![]() |
---|
You can edit your settings directly in the auto generated code. |
In run-time the most obvious result of this code is the way the custom application is presented in the ABB menu. In the following example, the first TpsView parameter has been changed from “MyApplicationName” to “Hello World”.
The first parameter of TpsView is the application name as it should appear in the ABB menu and on the task bar. The example uses HelloWorld as the application name.
Application iconThe second parameter is the file to be used as the application icon in the ABB menu. Usually a customized icon is used for the application.The example uses the default icon: tpu-Operator32.gif
TaskBar iconThe third parameter is the file to be used as the application task bar icon. The example uses the default icon tpu-Operator16.gif.
Application assemblyThe fourth parameter is the assembly name. If you change the name of the application assembly you also need to change this parameter to reflect that change. In the example, the assembly name is TpsViewHelloWorld.dll .
![]() |
---|
The assembly name must start with TpsView for TAF to identify it as an application to be loaded. If you forget this an error will be generated by the ABB verification tool when you try to build the project. |
The fifth parameter specifies the fully qualified class name of the initial view of your application, which you chose in the dialog box. In the example, the fully qualified class name is TpsViewHelloWorld.TpsViewHelloWorld.
Application locationThe sixth parameter determines the location of the application icon and text in the ABB menu. In the example these are displayed in the left column: .
Parameter value | Result |
---|---|
StartPanelLocation.Left | application visible to the left in the ABB menu. |
StartPanelLocation.Right | application visible to the right in the ABB menu. |
StartPanelLocation.None | application is not visible at all in the ABB menu. |
![]() |
---|
StartPanelLocation.None was introduced in 5.11.01. Applications that use it can therefore NOT be run on RobotWare releases older than 5.11.01. |
As you can tell from the two Hello World icons visible in the task bar, two instances of the Hello World application have been started. To enable this the seventh parameter is changed to : TpsViewType.Dynamic. Possible view type values are shown in the table:
Parameter value | Result |
---|---|
TpsViewType.Dynamic | You can start multiple instances of the application. |
TpsViewType.Static | You can only start one instance of the application. |
TpsViewType.Invisible | A background application with no GUI and no icon on the task bar. Can be started automatically or manually. Only one instance is possible. |
![]() |
---|
Unless there is special need for it, you should allow the user to start only one instance of the application: TpsViewType.Static. The reason is that working with several instances takes up valuable memory resources. |
The eighth parameter determines how the application is started. In the example the startup type is TpsViewStartupTypes.Manual and the application is started from the ABB menu. Using the manual startup type it is also possible to have the application started by RAPID or at operating mode change to auto for example. For more information, see System features supporting the use of customized screens.
If TpsViewStartupTypes.Automatic is chosen, the application is started automatically by TAF whenever the FlexPendant is restarted or a new user logs on.
Related informationFor information about the Style setting of the ProjectWizrd, see Container style.
To find the FlexPendant SDK Project Wizard in Visual Studio, see Setting up a new project.