Implementing the IGraphicAccess4 API
- Last UpdatedFeb 26, 2024
- 1 minute read
The GraphicAccess4 API is implemented by the ArchestrA.Visualization.GraphicAccess.dll
file, located in:
\Program Files (x86)\ArchestrA\Framework\Bin
IGraphicAccess4 is used to import graphic XML files. IGalaxy points to a Galaxy where the import operation is performed.
public interface IGraphicAccess4 : IGraphicAccess3
{
/// <summary>Import the XML files from the folder and generate Industrial Graphics</summary>
/// <param name="galaxy">IGalaxy obtained from GRAccess</param>
/// <param name="strFolderPath">The folder/directory path where graphic XML files are present</param>
/// <param name="bOverWrite">Flag which indicates if existing graphic should be overwritten</param>
/// <param name="opNotifier">Returns the status of the import operation to the calling function (client)</param>
/// <param name="cancelToken">Sets the token which indicates if the operation needs to be canceled during import</param>
/// <returns>Result of the method</returns>
Task<IGraphicAccessResult> ImportGraphics(IGalaxy galaxy, string strFolderPath, bool bOverWrite, IGraphicOperationStatus opNotifier = null, CancellationToken cancelToken = default);
}
The IGraphicAccess4 uses the IGraphicOperationStatus callback interface to determine if the operation is in progress, cancelled or completed.
namespace ArchestrA.Visualization.GraphicAccess
{
public interface IGraphicOperationStatus
{
void OnOperationProgressMessage(string message);
void OnOperationComplete();
void OnOperationCancel();
}
}