-
Ad alanı: Scada.AddIn.Contracts.Historian
Assembly: Scada.AddIn.Contracts (Scada.AddIn.Contracts.dll içinde) Version=16.0.0.0
C#
void SetDynamicProperty(
string propertyPath,
object value
)
Parametreler
propertyPath (Tip: String)
Özelliği tanımlayan bir dize. Örnek: "NetActive"
value (Tip: Object)
Özelliğe bağlı olarak bir variant değer döndürür; bu bir boolean, long veya bütün bir nesne olabilir.
Dönüş değeri
Tip: Void
| Ortam | Kullanılabilirlik |
|---|---|
| Engineering Studio | Kullanılabilir |
| Service Engine | Kullanılabilir |
C#
using System;
using Scada.AddIn.Contracts;
using Scada.AddIn.Contracts.Historian;
namespace Samples
{
[AddInExtension("Historian.EditorArchive.SetDynamicProperty", "Wizard to get and set dynamic properties", "Samples")]
public class EditorWizardExtension_Historian_EditorArchive_SetDynamicProperty : IEditorWizardExtension
{
public void Run(IEditorApplication context, IBehavior behavior)
{
if (context.Workspace.ActiveProject == null)
{
context.DebugPrint("No reference to an active zenon project", DebugPrintStyle.Error);
return;
}
IEditorArchive archiveEditor = context.Workspace.ActiveProject.EditorArchiveCollection[0];
if (archiveEditor == null)
{
archiveEditor = context.Workspace.ActiveProject.EditorArchiveCollection.Create("01", "ArchiveEditor", null);
}
string[] properties = archiveEditor.GetDynamicProperties("");
foreach (string property in properties)
{
context.DebugPrint("ArchiveProperty: " + property, DebugPrintStyle.Standard);
}
object name = archiveEditor.GetDynamicProperty("LongName");
if (name != null)
{
context.DebugPrint("LongName: " + name, DebugPrintStyle.Standard);
archiveEditor.SetDynamicProperty("LongName", "TestArchive");
context.DebugPrint("New LongName: " + archiveEditor.GetDynamicProperty("LongName"), DebugPrintStyle.Standard);
}
IPropertyParameter propParameter = archiveEditor.GetDynamicPropertyParameter("LongName");
if (propParameter != null)
{
context.DebugPrint("LongName Parameter is enabled: " + propParameter.IsEnabled, DebugPrintStyle.Standard);
}
}
}
}Bu konuda sorunuz mu var?SGE AI bu sayfaya ve ilgili yardım konularına dayanarak yanıtlar.
Bu sayfa, COPA-DATA zenon 16 çevrimiçi yardımının Türkçe çevirisidir. Menü ve ayar adları, programdaki gibi bulmanız için İngilizce bırakılmıştır.