version 6.0
DR SET REFNUM (area; scope; refNum)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -2 = Default, -1 = All, 0 = Selected, >0 = ID | |
| refNum | Longint | Reference number |
Description
The command DR SET REFNUM makes refNum the reference number for the objects in area described by scope.
A reference number is like an object name, in that it is a way to identify an object and it is not unique. A reference number is not an Object ID number, which is a unique number assigned by 4D Draw for each object in a document.
If scope equals -2, the command sets the default reference number.
If scope equals -1, the command sets the reference number for all objects in the document.
If scope equals 0,the command sets the reference number for the selected objects.
If scope is greater than 0, it must be equal to a specific object's ID; DR SET REFNUM sets that object's reference number. If the object does not exist, DR SET REFNUM does nothing, and DR Error returns error code 2.
A reference number is a non-unique long integer associated with an object. Reference numbers can be manipulated only procedurally. The default value for reference numbers is 0.
Example
The following example changes the reference number of the selected objects to the value contained in the process variable vNumber.
DR SET REFNUM (Area;0;vNumber)
See Also