DR LOCK

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR LOCK (area; scope; code; action)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected
>0=Object ID
codeLongintAttributes to affect
actionInteger0=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:

ValueLock
-1All
1Deletion
2Ungroup
8Name
32Size
128Location
2048Rotation
4096Fill pattern
8192Fill color
16384Line pattern
32768Line color
65536Line width
131072Endmarks
524288Text font
1048576Text size
2097152Text style
4194304Text justification
8388608Text editing
16777216Corner rounding
33554432Shape

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

DR Get ID.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next