GetReferences()
- Last UpdatedJan 16, 2025
- 2 minute read
Returns an XML string of all configured references in the runtime. The string can be saved to an XML file by using a .NET object.
Category
Miscellaneous
Syntax
stringXml = GetReferences("GraphicName");
Parameter
GraphicName
Description
Name of the graphic for which references are required.
Default
Empty
Parameter options
The following arguments can be specified for the function:
|
Empty string ("") |
When GetReferences() is called with an empty string argument, GetReferences() will export the references in the graphic where GetReferences() is called. For example, the graphic "s_itag1" is configured with a button that has an Action Script configured with GetReferences(""). When the button is selected at runtime, it exports the references configured in the "s_itag1" graphic. |
|
Graphic name used in the InTouch Window |
You can use an action script to export the references within the same graphic. In addition, the scripts can be run from another embedded graphic by specifying the graphic name in the InTouch window. The graphic name and reference VTQ in the graphic will be exported. |
|
Graphic element with hierarchy |
An example of a graphic element that includes the hierarchy is as follows: Symbol_c contains a text element – Text1. The method call would be: sXML = GetReferences ("Symbol_c1.Text1"); |
Return value
An XML string with the following exported references is returned:
-
Public Custom Properties
-
Private Custom Properties with overrides
-
InTouch tags
-
Attribute() with InTouch tags
-
VTQS, if the WinPlatform is deployed
-
MxReferences with absolute reference
-
MxReferences with resolved relative references (Me.Value)
-
Graphic references used in the ShowGraphic() scripts function
-
Popup graphic launched by ShowSymbol animation
-
References configured in the SetCustomPropertyValue() scripts function.
Examples
Example 1
dim sXml as string;
sXml = GetReferences("");
dim xmlDoc as System.Xml.XmlDocument;
xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(sXml);
xmlDoc.Save("C:\\tmp\\StringXML.xml");
Example 2
dim sXml as string;
sXml = GetReferences("s_itag1");
dim xmlDoc as System.Xml.XmlDocument;
xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(sXml);
xmlDoc.Save("C:\\tmp\\s_itag1.xml");
Example 3
dim sXml as string;
sXml = GetReferences("Tank1.Ellipse1");
dim xmlDoc as System.Xml.XmlDocument;
xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(sXml);
xmlDoc.Save("C:\\tmp\\Tank1Ellipse1.xml");