EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-21 08:35 PM . Last Modified: 2023-05-02 11:44 PM
Hi All,
In my database I have several group instances each containing a mimic. Some of these mimics are editable and others are not based on the templates "DocumentContent" property override.
Attached is a screenshot of two mimic tabs. One of them is locked (i.e Design mode is unavailable as shown by the lock symbol) and the other is not.
Which attribute specifies if the mimic is modifiable? I have attempted to locate this attribute in the in the OPC viewer with no luck. The "$Config.DocumentContent" value is null for both mimics.
Kind Regards,
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-24 02:55 AM
I don't believe there is a database property which can tell you if a field is writable.
The .net client API does have access to this information in the PropertyMetadata object.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-24 09:44 PM
Hi Steve,
I have modified the "ListAnimations" code from your github to use the .NET API instead of the ScxV6DBClient COM approach.
Within the loop below I wish to identify if the selected DBObject mimic is writable with the PropertyMetadata object you have noted above. I have been unable to find out how to implement this. I could not find detailed information within the Visual Studio object browser. I also could not find reference to the PropertyMetadata within the Client API Guide.
Would you be able to help me with this implementation of the PropertyMetadata object or point to a further resource?
Extract from modified List Animations code
var group = connection.GetObject("TestFolder");
var mimics = group.GetChildren("CMimic", "");
foreach (DBObject mimic in mimics)
{
var AdvMimic = AdvConnection.FindObject(mimic.FullName);
//Add check here to Identify the PropertyMetadata.IsWritable value for the selected AdvMimic, Skip mimics if this is not writable
Console.WriteLine("Mimc, " + mimic.FullName.Replace("\"", "\"\""));
ProcessMimic(mimic, vwx, SystemName);
}
The intent here is be to skip past mimics which are not writable.
Many Thanks,
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-25 01:49 AM
Just spotted this which should help:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-04-26 01:45 AM
Hi Steve,
Thank you kindly for your help. I managed to determine if a mimic was editable using a combination of the two properties below;
HasDocumentContentOverride – Returns TRUE on an unlocked mimic inside an instance and FALSE on locked mimics inside an instance. It also returns FALSE on every other mimic w/o the property override.
IsControlledByInstance - Returns TRUE if the mimic is controlled by an instance, i.e it is inside an instance that is part of its template (red arrow)
Using the below AND statement can determine if a mimic is locked or unlocked. Sample code below;
if (!AdvMimic.HasDocumentContentOverride & AdvMimic.IsControlledByInstance)
{
Console.WriteLine("LOCKED Mimic");
}
else
{
Console.WriteLine("UN-LOCKED Mimic");
}
Kind Regards,
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.