Source code for RsFsw.Implementations.Applications.K18_AmplifierEt.Layout.Replace.Window

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle
from ...... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class WindowCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("window", core, parent)

[docs] def set(self, window_name: str, window_type: enums.WindowTypeK18) -> None: """ ``LAYout:REPLace[:WINDow]`` \n Snippet: ``driver.applications.k18AmplifierEt.layout.replace.window.set(window_name = 'abc', window_type = enums.WindowTypeK18.AdjChPowerTable=ACP)`` \n Replaces the window type (for example from 'Diagram' to 'Result Summary') of an already existing window in the active channel while keeping its position, index and window name. To add a new window, use the method ``RsFsw.layout.add.window.get()`` command. :param window_name: String containing the name of the existing window. By default, the name of a window is the same as its index. To determine the name and index of all active windows in the active channel, use the method ``RsFsw.layout.catalog.window.get()`` query. :param window_type: (enum or string) Type of result display you want to use in the existing window. See method ``RsFsw.layout.add.window.get()`` for a list of available window types. """ param = ArgSingleList().compose_cmd_string(ArgSingle('window_name', window_name, DataType.String), ArgSingle('window_type', window_type, DataType.EnumExt, enums.WindowTypeK18)) self._core.io.write_with_opc(f'LAYout:REPLace:WINDow {param}'.rstrip())