macros:example:copyicon
Table of Contents
Example
Copy Icon (snippet only)
| by: | kimwida, January 2019 |
|---|---|
| published: | http://forum.avolites.com/viewtopic.php?f=20&t=5784#p21569 |
| description: | copy a legend icon from another handle |
functions
Code
<step pause="0.01">Handles.SetSourceHandleFromHandle(handle:"Location=Colours,1,3")</step> <step pause="0.01">Handles.SetIcon(Math.Cast.ToInteger(Handles.GetIconId(handle:"Location=Colours,1,1")))</step> <step pause="0.01">Handles.ClearSelection()</step>
Explanation
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
Handles.SetSourceHandleFromHandlesets a particular handle as the source handle - here: the target for the copy operationHandles.SetIconsets the icon of the target handleMath.Cast.ToIntegermakes sure the icon id is of the Int typeHandles.GetIconIdgets the id of the icon which is currently used for another specified handleHandles.ClearSelectionclears the selection so that no handle is highlighted as selected any more
How to use it
This is a snippet only - adapt and use it in your own macros.
You could leave a comment if you were logged in.
macros/example/copyicon.txt · Last modified: 2019/03/10 10:10 by 127.0.0.1
