ReverseLink()
Summary
Reverses the order of shape points on a link.
Syntax
reversed_id = ReverseLink(integer ID, array options)
| Argument | Contents |
|---|---|
| ID | The ID of the link to reverse |
| Option | Type | Contents |
|---|---|---|
| Reason | String | If provided, a record will be added to the database's log file, with this used as the Reason column. If it's not provided, no entry will be added, even if the other options are present. |
| Comment | String | Text for the comment field of the log file. |
| User | String | User name for the log file. |
Returns
The ID of the reversed link.
Notes
-
The line layer must be the current layer.
-
The log file name will have the same name as the database and a .txt extension.
-
The DIR field of the link gets automatically updated.
Example
// Reverse a line feature where the user clicks
SetLayer("Roads")
id = RH2ID(LocateNearestRecord(ClickCoord(), 0.25))
ReverseLink(id, )
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The current layer is not a line layer, or is not from a standard geographic file |
| NotFound | There is no feature with the given ID |
See Also
| Function | Summary |
|---|---|
| AddLink() | Adds a line feature to a line layer |
| DeleteLink() | Deletes a line feature from a line layer |