Develop a NetLogic that sets label text

This runtime NetLogic changes the text of a label. The NetLogic can be triggered with an MouseClickEvent event.
Prerequisites
Set the default external code editor. See Set the default code editor.
  1. To develop the NetLogic
  2. In
    Project view
    , right-click the
    NetLogic
    folder and select
    New
    Runtime NetLogic
    .
  3. Double-click the NetLogic.
    The external code editor opens.
  4. Edit the NetLogic by replacing the existing
    RuntimeNetLogic1
    class with the following code. See Edit a NetLogic.
    #region Using directives using System; using UAManagedCore; using OpcUa = UAManagedCore.OpcUa; using FTOptix.HMIProject; using FTOptix.UI; using FTOptix.NativeUI; using FTOptix.Core; using FTOptix.CoreBase; using FTOptix.NetLogic; #endregion public class RuntimeNetLogic1 : FTOptix.NetLogic.BaseNetLogic { [ExportMethod] public void SetLabelTextToHelloWord(NodeId labelNodeId) { var label = InformationModel.Get<Label>(labelNodeId); label.Text = "Changed label text"; } }
  5. Save the code.
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.