I am using AF-SDK 2018 to import and export xml files from and to PI-AF servers: PI-AF-Services_2017-R2-Update-1.
On the Import I use the method call :
PISystem.ImportXml Method (Object, PIImportMode, XmlReader, EventHandler<AFProgressEventArgs>)
When Importing 'Database' xml that includes 'ElementTemplate' to the destination server, and that ElementTemplate has an 'Attribute Templates' with the following characteristics:
1) 'Value Type': String
2) 'Default Value': None (the 'PI System Explorer' displays: "Press F2 to show the Text Visualizer dialog"
3) 'Data Reference': <None>
I am encountering the following problem:
All Elements that rely on that template and that on their attributes have a 'Value' set to an object (the property where their ElementTemplate's default value is empty), are missing their value after the import of the ElementTemplate (Their value is absent).
I wish to know- Is that a known issue? or is there something I may be doing wrong?
Currently the way I am dealing with this problem is by calling AFAttribute.SetValue method on every Element, and setting the lost value according to the data I kept before the import.
This solution is time-consuming and inefficient and I wish this problem can be resolved in other way.
I will appreciate any guiding or suggestion.