Source code for rsrtx.Implementations.Layout.Zoom.PosCoupling

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


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

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

[docs] def set(self, diagram_group: str, zoom_diagram: str, posi_cpl: bool) -> None: """ ``LAYout:ZOOM:POSCoupling`` \n Snippet: ``driver.layout.zoom.posCoupling.set(diagram_group = 'abc', zoom_diagram = 'abc', posi_cpl = False)`` \n Enables or disables the position coupling of coupled zooms. If position coupling is enabled and one zoom area is moved, the other coupled zoom areas are moved, too, and keep their distance. :param diagram_group: String with the name of the diagram on which the zoom is based :param zoom_diagram: String with the name of the zoom diagram :param posi_cpl: OFF | ON """ param = ArgSingleList().compose_cmd_string(ArgSingle('diagram_group', diagram_group, DataType.String), ArgSingle('zoom_diagram', zoom_diagram, DataType.String), ArgSingle('posi_cpl', posi_cpl, DataType.Boolean)) self._core.io.write_with_opc(f'LAYout:ZOOM:POSCoupling {param}'.rstrip())
[docs] def get(self, diagram_group: str, zoom_diagram: str) -> bool: """ ``LAYout:ZOOM:POSCoupling`` \n Snippet: ``value: bool = driver.layout.zoom.posCoupling.get(diagram_group = 'abc', zoom_diagram = 'abc')`` \n Enables or disables the position coupling of coupled zooms. If position coupling is enabled and one zoom area is moved, the other coupled zoom areas are moved, too, and keep their distance. :param diagram_group: String with the name of the diagram on which the zoom is based :param zoom_diagram: String with the name of the zoom diagram :return: posi_cpl: OFF | ON """ param = ArgSingleList().compose_cmd_string(ArgSingle('diagram_group', diagram_group, DataType.String), ArgSingle('zoom_diagram', zoom_diagram, DataType.String)) response = self._core.io.query_str_with_opc(f'LAYout:ZOOM:POSCoupling? {param}'.rstrip()) return Conversions.str_to_bool(response)