version 6.0
DR Get text width (area; scope) Integer
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -3=Selected characters | |
| -1=All | |||
| 0=Selection | |||
| >0=Object ID | |||
| Function result | Integer | Width of the text |
Description
The command DR Get text width returns the width of the text in scope. The width is returned in the units specified for the document's ruler.
If scope equals -3, the command returns the width of the selected characters.
If scope equals -1, the command returns the longest text line in the 4D Draw area.
If scope equals 0, the command returns the longest line in the current selection.
If scope is greater than 0, the command returns the longest line in the object identified by the ID number passed as a parameter. If no object corresponds to this ID number, the command returns -32000 and DR Error returns 2.
The values for the scope parameter are listed in the paragraph "Specifying the Scope of a Command" of the Manipulating Objects section.
You can use the DR Get ruler function to determine the current ruler setup.