The IGraphicAccess API
- Last UpdatedJul 08, 2024
- 1 minute read
The GraphicAccess API is implemented by the ArchestrA.Visualization.GraphicAccess.dll
file, located in:
\Program Files (x86)\ArchestrA\Framework\Bin
IGraphicAccess is used to export an Industrial Graphic to an XML file, or to import an XML file into a Galaxy as an Industrial Graphic. IGalaxy points to the Galaxy where the import/export operation is performed.
public interface IGraphicAccess
{
/// <summary>Export an Industrial Graphic to XML file</summary>
/// <param name="galaxy">IGalaxy obtained from GRAccess</param>
/// <param name="graphicName">The graphic name</param>
/// <param name="xmlFilePath">The XML file path</param>
/// <returns>Result of the method</returns>
IGraphicAccessResult ExportGraphicToXml(IGalaxy galaxy, string graphicName, string xmlFilePath);
/// <summary>Import the XML file and generate an Industrial Graphic</summary>
/// <param name="galaxy">IGalaxy obtained from GRAccess</param>
/// <param name="graphicName">The graphic name</param>
/// <param name="xmlFilePath">The XML file path</param>
/// <param name="bOverWrite">Flag which indicates if existing graphic should be overwritten</param>
/// <returns>Result of the method</returns>
IGraphicAccessResult ImportGraphicFromXml(IGalaxy galaxy, string graphicName, string xmlFilePath, bool bOverWrite);
void ValidateSymboltoExport(IGalaxy galaxy, string graphicName);
}
public interface IGraphicAccessResult : ICommandResult
{
XMLOperations.StatusCode Status { get; }
}
If the Galaxy has security enforced, you must first log in to the Galaxy Repository with proper credentials. Also, the Can Export Graphics and Can Import Graphics Galaxy role permissions must be set active before attempting an import or export operation.
You can set the Can Export Graphics and Can Import Graphics Galaxy role permissions from the IDE Configure Security dialog box. For more information about setting Galaxy permissions, see the Application Server Help.