LayerSetAxisLinkName¶
LayerSetAxisLinkName sets an diagram axis link.
-
bool = LayerSetAxisLinkName(hLayer, ssAxis, ssLinkName)
Return Value
If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0).
Parameters
-
hLayer
Identifies the layer.
-
ssAxis
ssAxis is a scalar string with the value “X” or “Y”. “Z” is not supported.
-
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 “”.
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 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 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 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 PageUpdateAxisLink:
PageUpdateAxisLink(GetParent(hLayer))
After the document has been created using UniScript the axes scales will be updated by the frame work.
History
Version | Description |
---|---|
R2012 (5.40.0) | New. |
See also
Overview Diagrams, LayerCreate, LayerGetAxisLinkName, LayerUpdateDocumentMap, PageUpdateAxisLink
id-1643567