version 6.0
DR SET POLYGON VERTEX (area; scope; number; vertexH; vertexV)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1 = All, 0 = Selected, >0 = Object ID | |
| number | Integer | Number of vertex to edit | |
| vertexH | Real | Horizontal Position | |
| vertexV | Real | Vertical Position |
Description
The command DR SET POLYGON VERTEX modifies the vertex specified by number for the polygon in area described by scope.
If scope equals -1, the command affects the first object in the document.
If scope equals 0, the command affects the first selected object.
If scope is greater than 0, it must be equal to a specific polygon's ID and that polygon is affected. If the object does not exist, the command does nothing, and DR Error returns error number 2.
If the object described by scope is not a polygon, DR SET POLYGON VERTEX does nothing, and DR Error returns error number 47.
number is the number of the vertex within the polygon. Vertices are numbered in the order in which they were created. If number exceeds the number of vertices in the polygon, DR SET POLYGON VERTEX does nothing, and DR Error returns error number 49.
vertexH and vertexV are the new coordinates for the vertex. Both vertexH and vertexV are expressed in base units. Use the DR Scale to base function to convert from scale units to base units. vertexH and vertexV are specified as offsets from the current origin. Positive values indicate a position below or to the right of the origin. Negative values indicate a position above or to the left of the origin.
Example
The following example gets the position of the first vertex of the polygon whose ID equals 1 and resets the vertex one unit down and one unit to the right.
DR GET POLYGON VERTEX (Area;1;1;$VertexH;$VertexV) DR SET POLYGON VERTEX (Area;1;1;$VertexH + 1;$VertexV + 1)
See Also