Class RobotStudioAPI
Intended for internal use only.
Inheritance
Namespace: ABB.Robotics.RobotStudio
Assembly: ABB.Robotics.RobotStudio.dll
Syntax
public sealed class RobotStudioAPI
Constructors
View SourceRobotStudioAPI()
ABB internal use.
Declaration
public RobotStudioAPI()
Properties
View SourceDataDirectory
Gets path to the directory where RobotStudios data files are stored, typically equal to the installation directory.
Declaration
public static string DataDirectory { get; }
Property Value
| Type | Description |
|---|---|
| string |
EnableProjectObjectChangedEvents
Used to temporarily disable the ProjectObjectChanged event.
Declaration
public static bool EnableProjectObjectChangedEvents { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Initialized
Gets a value that indicates if the API has been properly initialized.
Declaration
public static bool Initialized { get; }
Property Value
| Type | Description |
|---|---|
| bool |
InternalLicense
Declaration
[Obsolete("No longer supported")]
public static bool InternalLicense { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsAddinHost
Gets if the running application is a minimal add-in host rather than the full RobotStudio executable.
Declaration
public static bool IsAddinHost { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsCondemned
Can be set before starting shutdown. Acts as a hint that proper cleanup of memory is not needed (if time consuming), since the process is about to die anyway.
Declaration
public static bool IsCondemned { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
MainThread
Gets the main (GUI) System.Threading.Thread of the application.
Declaration
public static Thread MainThread { get; }
Property Value
| Type | Description |
|---|---|
| Thread |
SyncContext
Represents the synchronization context that most API methods must be called on.
Declaration
public static SynchronizationContext SyncContext { get; }
Property Value
| Type | Description |
|---|---|
| SynchronizationContext |
SynchronizeInvoke
Provides a way to execute delegates in the GUI context.
Declaration
public static ISynchronizeInvoke SynchronizeInvoke { get; set; }
Property Value
| Type | Description |
|---|---|
| ISynchronizeInvoke |
Version
Gets the application version number.
Declaration
public static Version Version { get; }
Property Value
| Type | Description |
|---|---|
| Version |
Methods
View SourceAssertMainThread()
Declaration
[Conditional("DEBUG")]
public static void AssertMainThread()
Initialize()
Performs initialization necessary before any other API can be used.
Declaration
public static void Initialize()
Initialize(string)
Performs initialization necessary before any other API can be used.
Declaration
public static void Initialize(string dataDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dataDirectory |
RunOnMainThread(Action)
Runs an action on the main (GUI) application thread.
Declaration
public static void RunOnMainThread(Action a)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | a | Action to execute |
Remarks
If calling from the main thread the action is executed synchronously without error handling.
RunOnMainThread(Action, bool)
Runs an action on the main (GUI) application thread.
Declaration
public static void RunOnMainThread(Action a, bool throwOnFailureToExecute)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | a | Action to execute |
| bool | throwOnFailureToExecute | True to throw an System.InvalidOperationException if the main thread could not be used, typically if the application is in startup or shutdown phase. |
Remarks
If calling from the main thread the action is executed synchronously without error handling.
Shutdown()
Performs cleanup before exiting the application. After calling this no other API can be used.
Declaration
public static void Shutdown()
Shutdown(bool)
Declaration
[Obsolete("Use Shutdown() instead")]
public static void Shutdown(bool final)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | final |
Events
View SourceShuttingDown
Occurs when Shutdown() is called.
Declaration
public static event EventHandler ShuttingDown
Event Type
| Type | Description |
|---|---|
| EventHandler |