version 6.0
DR LOCK (area; scope; code; action)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1=All | |
| 0=Selected | |||
| >0=Object ID | |||
| code | Longint | Attributes to affect | |
| action | Integer | 0=Unlock | |
| 1=Lock | |||
| 2=Toggle |
Description
The command DR LOCK locks or unlocks the attributes described by code for the objects in area described by scope.
If scope equals -1, DR LOCK affects all objects in the document.
If scope equals 0, DR LOCK affects the selected objects.
If scope is greater than 0, it must be equal to a specific object's ID and that object's attributes are affected. If the object does not exist, DR Error returns error number 2.
The objects described by scope are locked or unlocked according to the code and action parameters. code describes the attributes to act upon and is expressed as the sum of lock codes.
The following is the list of lock codes:
| Value | Lock |
| -1 | All |
| 1 | Deletion |
| 2 | Ungroup |
| 8 | Name |
| 32 | Size |
| 128 | Location |
| 2048 | Rotation |
| 4096 | Fill pattern |
| 8192 | Fill color |
| 16384 | Line pattern |
| 32768 | Line color |
| 65536 | Line width |
| 131072 | Endmarks |
| 524288 | Text font |
| 1048576 | Text size |
| 2097152 | Text style |
| 4194304 | Text justification |
| 8388608 | Text editing |
| 16777216 | Corner rounding |
| 33554432 | Shape |
action specifies what to do to the attributes described by code.
If action equals 0, DR LOCK unlocks the attributes described by code.
If action equals 1, DR LOCK locks the attributes described by code.
If action equals 2, DR LOCK toggles the current state of the attributes, that is, it unlocks locked attributes and locks unlocked ones. Attributes not specified by code remain unchanged.
Example
The following example unlocks all attributes for the selected objects in Area.
DR LOCK (Area;0;-1;0)
See Also