Access script state and operations via scripts.

ReferenceCodeNamespacesAlarm | Client | Dataset | Device | Display | Historian | Info | Report | Script | Security | Server


The Script Namespace exposes runtime script state to .NET scripts. Use @Script to reference the namespace, followed by the accessors listed below.


Child Namespaces

Sub-namespaces exposing collections and grouped configuration. Reach each via its qualified path.

Path

Description

@Script.class (2 members)

Gets the collection of user-defined Script Class objects, indexed by class name (e.g., @Script.Class.MyClass). Each entry exposes a singleton instance of the compiled class whose public members (methods, properties, fields) are reachable as @Script.Class.MyClass.Member from any other script in the solution.

@Script.task (4 members)

Gets the collection of Script Task objects configured in the solution, indexed by task name (e.g., @Script.Task.MyTask) or numeric ID. Each task is a scheduled / triggered unit of script code with its own execution counters, error state and run history.

Script Members

Direct properties and methods on @Script.

Member

Kind

Type

Description

deactivateCounter

Property

Int32

Gets a counter that increments each time a Script task is deactivated by the runtime (typically on shutdown or module restart). Useful as a diagnostic signal when investigating unexpected task halts.

disableMultiThreading

Property

Boolean

Gets or sets whether Script task execution is forced onto a single thread. When true, script tasks are serialized regardless of their individual configuration; when false (default), tasks run on the thread pool per their own settings. Set to true to simplify troubleshooting of timing-related issues in solution scripts.

expression

Property

ScriptsExpressions

Gets the collection of Script Expression objects, accessed by expression name. Syntax: @Script.Expression.ExpressionName.

getTaskEventCount

Method

Int32

(no description)

preloadedTags

Property

Boolean

Gets whether the Script module has finished preloading the tags referenced by its solution scripts. Use as a gating check before a Startup script runs logic that expects every referenced tag to already be resolvable.

Member set auto-generated from RuntimeNamespace.json (build fx-10.1.5.2000, schema 1.0, generated 2026-05-17T21:29:31.4885315Z). For the full .NET API surface see the external Script Namespace .NET API Reference.


In this section...


  • No labels