ALLYCAD REFERENCE - AllYCAD - #751

/ 838


catalogue search
P. 751
P. 752
P. 753
P. 754
P. 755
P. 756
P. 757
P. 758
P. 759
P. 760
P. 761
P. 762
P. 763
P. 764
P. 765
P. 766
P. 767
P. 768
P. 769
P. 770
P. 771
P. 772
P. 773
P. 774
P. 775
P. 776
P. 777
P. 778
P. 779
P. 780
P. 781
P. 782
P. 783
P. 784
P. 785
P. 786
P. 787
P. 788
P. 789
P. 790
P. 791
P. 792
P. 793
P. 794
P. 795
P. 796
P. 797
P. 798
P. 799
P. 800


See other catalogues for AllYCAD

Text version of the page
Coordinate pairs
In compiled macro, the coordinates of a point are represented in two ways, depending on whether the user must supply the position of the point interactively, or whether the program specifies the position.
There is also another way to get the user to enter a point or sequence of points interactively which will be explained at the end of this section.
If the point's position must be supplied interactively using the mouse or keyboard, represent the point as a question mark enclosed in square brackets as follows:
[?]
If the program must supply the coordinates, represent the point as a pair of numeric expressions, separated by a comma and enclosed in square brackets, as follows:
[xcoord, ycoord]
For example, the following command draws a circle with its centre at [5,5], and prompts the user to enter a point on the circumference of the circle:
CIR [5,5] [?] [#]
The above example represents the absolute coordinates of the circle centre, and does not change the current cursor position. If you want to indicate that a pair of coordinates is relative to the current cursor position, place an ampersand (@) between the opening bracket and the x coordinate, as follows:
[©xcoord, ycoord]
To update the current cursor position, insert a percentage sign as follows:
[%xcoord, ycoord]
which moves the current cursor position to the absolute coordinates xcoord, ycoord. The pair [@%x,y] gives a relative movement and leaves the cursor at the new position.
You can use all three "modifier" characters # @ and % in one coordinate pair, but they must always be in the order shown. The # character denotes a press of the SPACE BAR after the coordinate was entered, and is used to terminate the built-in command which is executing.
If the AllyCAD program is executing a macro program and comes across something else while it is expecting a coordinate pair, it prompts the user to enter the point interactively.
Compiled Macros
18-9

pageCatalog pdf di En 2012-05-21-27