Using functions
Translation:
The object can have, in addition to 3 palettes, up to 5 functions. In most cases, their names correspond to functions from the script. For example: PosX = %HI_SetPosX.
The functions take a single parameter: a D2000 object or a local variable that can be controlled by an expression.
Meaning: This solution does not burden communication with the script—it does not fill the queue of HI messages coming from the script and the kernel. As a result, it places a significantly lower load on the HI process.
Change order within the pallet type
Copy connected value between palettes
Implemented functions:
Enable | The Enable function disables/enables access to the graphical object. | |
Visible | The Visible function hides/shows the graphical object. | |
PosX | The PosX function sets the X coordinate of the graphical object. | |
PosY | The PosY function sets the Y coordinate of the graphical object. | |
PosX+ | The PosX+ function shifts (offsets) the X coordinate of the graphical object. | %HI_SetPosX (%HI_GetPosX+hodnota) |
PosY+ | The PosY+ function shifts (offsets) the Y coordinate of the graphical object. | %HI_SetPosY(%HI_GetPosY+hodnota) |
SizeX | The SizeX function sets the width of the graphical object | |
SizeY | The SizeY function sets the height of the graphical object | |
DistX | The DistX function sets the distance from one point of the object to the next point along the X-axis. | |
DistY | The DistY function sets the distance from one point of the object to the next point along the Y-axis. | |
LineWidth | The LineWidth function sets the line thickness. | |
Text | The SetText function sets the text of the graphical object. | |
SetLineTerminator | The SetLineTerminator function sets the line termination style, including the termination of individual lines in a multi-line object. | |
ForeColor | The ForeColor function sets the foreground color of the graphical object. | |
BackColor | The BackColor function sets the background color of the graphical object. | |
BackColor2 | The BackColor2 function sets the secondary gradient color of the graphical object. | |
TextColor | The TextColor function sets the text color of the graphical object. |
Príklad:
Here is an example of a simple clock in a scheme with its center at **[100,100]**, implemented **without using a script**—the highlighted point moves simultaneously with the second hand.
Related pages: