PC SDK 5.14.02 Release

PC SDK 5.14.02 Release

Release Notes

Improvements and corrected issues

Manage mastership for all controller resources

It is now possible to request and release mastership over all resources of the controller at the same time.

Example:

Controller controller;
using(Mastership.Request(controller))
{
// add your code here
}

By calling controller.IsMaster you can check if you have mastership over all the resources.

Event when Task.Enabled is changed

The new event Controller.EnabledChanged is fired when the task selection state is changed.

Task.Enabled can be set ?_" under the following circumstances

When using PC SDK from a RobotStudio Add-In, connected to a Virtual Controller, that is in Manual Mode, it is possible to set the task enabled property. Under all other conditions, setting the property will throw an exception.

Task.Enabled can be set ?_" under the following conditions

When using PC SDK from a RobotStudio Add-In, connected to a Virtual Controller, that is in Manual Mode, it is possible to set the task enabled property. Under all other conditions, setting the property will throw an exception.

Instance.SetAttribute works for string data type attributes

It is now possible to set the value of attributes with string data type.

Type.GetObject renamed to Type.GetInstance

The methods Type.GetObjects() and Type.GetObject(string name) has been renamed Type.GetInstances() and Type.GetInstance(string name) for usability reasons. The old methods can still be used but are marked as obsolete.

Fill ArrayData from string

It is now possible to fill arrays from strings. If the string is not of the correct format, an exception of type RapidDataFormatException is thrown.

Example:

ArrayData data = …

data.FillFromString2(?_o…?__);

Note:

The fill from string implementations of all RAPID data type classes like ?_oBool?, ?_oRobTarget?, ?_oNum?__, etc, is documented to through a RapidDataFormatException if the string is not of the correct format. However the behaviour was different than the documentation and various .NET exceptions like NullReferenceException, as the general PC SDK GenericControllerException was thrown instead. When fill from string was implemented for array types, it was desired to have the same error handling as for the atomic types, mentioned above. Throwing RapidDataFormatException instead of GenericControllerException, would break compatibility. In order to provide a consistent set of fill from string implementations the current FillFromString method was made obsolete in favour for FillFromString2 which implements the correct functionality and error handling.

Class UserDefined initialized to a valid default value

When creating an instance of the UserDefined class, its Components property now returns an array of sub components, representing the default value for the record type represented by the instance. In previous versions null was returned for a newly created UserDefined instance.

AuthorizationException threwn when not logged in

When calling methods that requires a logged on user, without a previous logon, an AuthorizationException exception is thrown, with a message text explaining that a log on is required.