Optional tools for IntelliSense

FactoryTalk® Optix
allows to expand the features, properties and events of some built-in objects through IntelliSense: a NetLogic tool consisting of a C# code-completion aid made available through an editor, such as Visual Studio or Visual Studio Code.
Install and Configure Visual Studio or Install and Configure Visual Studio Code on your device.
NOTE: While you can edit an object file offline by using Notepad++, IntelliSense accessories work only on the Visual Studio or Visual Studio Code editors.
  1. If you are using
    FactoryTalk® Optix
    version 1.4.0 or later, install .NET SDKs on your device to enable the IntelliSense NetLogic installation and implementation.
    • On the design device, install
      Visual Studio 2022 SDK
      , according to your device architecture.
    • On the device where the application is deployed, install
      .NET Runtime (Windows)
      , according to your device version.
    NOTE: For instructions on how to install .NET SDK, refer to the online documentation.
  2. To edit your object, in
    FactoryTalk® Optix
    Studio select the at the top of the screen.
    A dialog window opens.
  3. Select your
    Preferred code editor
    : Visual Studio or Visual Studio Code.
  4. In the
    Project view
    panel, browse to
    MainWindow
    and add a
    Label
    .
    Label1
    is created.
  5. Rename
    Label1
    to
    MyLabel
    .
  6. Add a Runtime or Design Time NetLogic by selecting
    New
    Runtime NetLogic
    or
    New
    Design NetLogic
    depending on when you would like to use the NetLogic: at runtime or design time.
    A NetLogic object (for example, a NetLogic named
    RuntimeNetLogic1
    ) is created in the
    Project view
    panel under your project.
  7. Double click the
    RuntimeNetLogic1
    NetLogic.
    The NetLogic opens in your code editor.
  8. In Visual Studio or Visual Studio Code, under
    Insert code to be executed when the user-defined logic is started
    , enter
    Label myLabel = Owner.Get<Label>("MyLabel");
    .
  9. Press
    Enter
    to add a new line and start typing
    myLabel.
    .
    IntelliSense prompts the methods, properties and events available for
    myLabel.
    by opening a dropdown menu.
  10. Select the method, property or event that you would like to add to your
    Label
    customization, along with the related syntax, datatype or arguments.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.