Scripting Layers

Scripting is not supported by TWC

Adding a control to a layer via script will not automatically update its visibility to match that of the layer. Instead the control will maintain its existing visibility until the layer visibility is modified. When scripting layers the following order of operation is required:

  1. Add controls to the layer.
  2. Modify the visibility of the layer.

Note: Layer visibility can be controlled at runtime via the AddLayer, HideLayer, SetLayerVisibility, and ShowLayer methods on the Screen object.

Methods Description

AddLayer

The AddLayer method dynamically adds a layer to a screen object at runtime.

Example

The script call is as follows:

Copy
AddLayer method
bjects.Screen.AddLayer("Layer 1");

where "Layer 1" is the layer name.

See Scripting Layers for more information about using this method.

HideLayer

The HideLayer method dynamically hides a layer on a screen object at runtime.

Example

The script call is as follows:

Copy
HideLayer method
Objects.Screen.HideLayer("Layer 1");

where "Layer 1" is the layer name.

See Scripting Layers for more information about using this method.

SetLayerVisibility

The SetLayerVisibility method dynamically shows or hides a layer on a screen object at runtime.

Example

The script call is as follows:

Copy
SetLayerVisibility method
Objects.Screen.SetLayerVisibility("Layer 1", false);
 
Objects.Screen.SetLayerVisibility("Layer 1", true);

where "Layer 1" is the layer name.

See Scripting Layers for more information about using this method.

ShowLayer

The ShowLayer method dynamically shows a layer on a screen object at runtime.

Example

The script call is as follows:

Copy
ShowLayer method
Objects.Screen.ShowLayer("Layer 1");

where "Layer 1" is the layer name.

Also see Layers Pane for more information about using the Layers pane in design mode.