.. highlightlang:: us .. index:: LayerSetAxisLinkName .. _layersetaxislinkname: LayerSetAxisLinkName ==================== .. us.tag LayerSetAxisLinkName ENGLISH LayerSet New5400 :ref:`LayerSetAxisLinkName` sets an diagram axis link. .. function:: bool = LayerSetAxisLinkName(hLayer, ssAxis, ssLinkName) .. us.return **Return Value** If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: hLayer Identifies the layer. .. uparam:: ssAxis *ssAxis* is a scalar string with the value "X" or "Y". "Z" is not supported. .. uparam:: ssLinkName *ssLinkName* is the name of the link for example "xlink1". The text is used to link the axis of the same type. Axes with the same link name will display the same scaling. To remove a link set *ssLinkName* to an empty string "". .. us.comment **Comment** Linked axes will display the same scaling. If one of the axis scale is modified, the other linked axes will display the new scaling. With :ref:`LayerSetAxisLinkName` linked axes can be located on different pages of the same document. To establish a link with UniScript the following steps must be executed: 1. For all axes the function :ref:`LayerSetAxisLinkName` must be invoked. The parameter *ssLinkName* must be set to the same name, e.g. "xlink1". Example(can be invoked in a for loop):: LayerSetAxisLinkName(hLayer, "X", "xlink1"); 2. For one of the linked diagram axes the :ref:`LayerUpdateDocumentMap` must be invoked. The function creates a copy of the axis scale of the given layer and copies the data into a document table:: LayerUpdateDocumentMap(hLayer, "X", TRUE); 3. To update all other linked diagrams in the current page invoke the function :ref:`PageUpdateAxisLink`:: PageUpdateAxisLink(GetParent(hLayer)) After the document has been created using UniScript the axes scales will be updated by the frame work. **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2012 (5.40.0) - New. .. seealso:: :ref:`overview-diagrams`, :ref:`LayerCreate`, :ref:`LayerGetAxisLinkName`, :ref:`LayerUpdateDocumentMap`, :ref:`PageUpdateAxisLink` :sub:`id-1643567`