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.
Set the default external code editor. See Set the default code editor.
  1. To develop the NetLogic
  2. In
    Project view
    , right-click the
    folder and select
    Runtime NetLogic
  3. Double-click the NetLogic.
    The external code editor opens.
  4. Edit the NetLogic by replacing the existing
    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.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.