The IGraphicAccess2 API
- Last UpdatedJul 08, 2024
- 1 minute read
The GraphicAccess2 API is implemented by the ArchestrA.Visualization.GraphicAccess.dll
file, located in:
\Program Files (x86)\ArchestrA\Framework\Bin
IGraphicAccess2 is used to export all of a graphic's substitutable strings to a specified XML file, regardless of whether some of the strings have been overridden.
The GraphicAccess2 API can also be used to export a list of configured references for a selected graphic to an XML string.
IGraphicAccess2 passes galaxy, graphicName, the XML file path, and substitute strings as parameters.
public interface IGraphicAccess2 : 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>
/// <param name="bExportSubstituteStrings">Option to export SubstituteStrings</param>
/// <returns>Result of the method</returns>
IGraphicAccessResult ExportGraphicToXml(IGalaxy galaxy, string graphicName, string xmlFilePath, bool bExportSubstituteStrings);
/// <summary>Get references configured on an Industrial Graphic</summary>
/// <param name="galaxy">IGalaxy obtained from GRAccess</param>
/// <param name="graphicName">The graphic name</param>
/// <param name="sConfiguredReferencesXML">Returns all the references in XML format</param>
/// <returns>Result of the method</returns>
IGraphicAccessResult GetConfiguredReferences(IGalaxy galaxy, string graphicName, out string sConfiguredReferencesXML);
}
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.