$entinfo
Return information about an entity.
$entinfo(
Entity,
Topic)
Example:
vFIelds = $entinfo($entname, "paintedfields")
Parameters
Parameter | Data Type | Description |
---|---|---|
Entity | String | Entity name |
Topic | String | Valid topic name (see Topics and their Returned Values ). The topic name is not case-sensitive; you can use uppercase or lowercase letters, or any combination of these, to increase readability. |
Return Values
An empty string (""
) is returned
if an error occurred, in which case, $procerror contains a negative value that
identifies the exact error.
Value | Error constant | Meaning |
---|---|---|
-1102
|
UPROCERR_ENTITY
|
The entity name provided is not a valid name or the entity is not painted on the component. |
-1110
|
UPROCERR_TOPIC
|
Topic name not known. |
Use
Allowed in all component types.
Description
The $entinfo function is especially useful in writing generalized operations and global ProcScript entries where the information needs to be determined at run time rather than built into the component.
Setting Field Colors of the Current Entity
The following example sets the color for all fields of the current component entity to yellow letters on a purple background.
operation MAKE_COLORFUL variables string LIST_OF_FIELDS string FIELD endvariables LIST_OF_FIELDS = $entinfo($entname, "PAINTEDFIELDS") while (LIST_OF_FIELDS != "") getitem FIELD, LIST_OF_FIELDS, -1 ; give this field bright colors fieldvideo FIELD, "COL=53" delitem LIST_OF_FIELDS, -1 endwhile end