version 6.0
SET RESOURCE NAME (resType; resID; resName{; resFile})
Parameter | Type | Description | |
resType | String | 4-character resource type | |
resID | Number | Resource ID number | |
resName | String | New name for the resource | |
resFile | DocRef | Resource file reference number, or | |
current resource file, if omitted |
Description
The SET RESOURCE NAME command changes the name of the resource whose type is passed in resType and whose ID number is passed in resID.
If you pass a valid resource file reference number in the parameter resFile, the resource is searched for within that file only. If you do not pass the parameter resFile, the resource is searched for within the current open resource files.
If the resource does not exist, SET RESOURCE NAME does nothing and sets the OK variable to 0 (zero).
WARNING: DO NOT change the names of resources that belong to 4D or to any System files. If you do so, you may provoke undesired system errors.
Note: Resource names can be up to 255 characters in length. They are not case sensitive, but are diacritical sensitive.
Example
See example for the command Get resource name.
See Also
System Variables or Sets
The OK variable is set to 0 if the resource does not exist, otherwise it is set to 1.