ASSOCIATEDACTIONS

Concept Link IconSee also Concept Link IconFile formats

Import the Associated Actions for an alarm, from a file or a buffer.

WebVue support - Yes.

Mode Mnemonic Syntax
0 IMPORTBYFILE 1
1 IMPORTBYHANDLE 2

The file formats are shown in the tables of the topic Associated Action Formats.

Syntax 1

IntVal = ASSOCIATEDACTIONS(Mode, FileName);

Return type: INTEGER.

Argument

Meaning

FileName

Name of the text file in the TP folder of the project or in a folder selected by an absolute path. Type STR.

Execution

Mode

Mnemonic

Action

0

IMPORTBYFILE

Import the associated action configuration for the alarms from the specified file and folder.

Return:
0 if the file could not be found or if it contained no element to import.
Otherwise, a positive number corresponding to the number of lines processed as part of the import.
A line may have been processed and not caused any configuration change if its syntax was invalid or if it referred to the deletion or modification of an element that did not exist in the configuration.

Example

ASSOCIATEDACTIONS(0, "addAAA.dat");

ASSOCIATEDACTIONS("IMPORTBYFILE", "addAAA.dat");

Syntax 2

IntVal = ASSOCIATEDACTIONS(Mode, Handle);

Return type: INTEGER.

Argument

Meaning

Handle

Address of the buffer memory area as allocated by ALLOC_BUFFER. Type LONG.

Execution

Mode

Mnemonic

Action

1

IMPORTBYHANDLE

Import associated action configuration for the alarms from a buffer.

 

 

Returns: 1 if OK, else 0.

Example

DIM hbuf AS LONG;

hbuf = FILETOBUF("addAAA.dat");

ASSOCIATEDACTIONS(1, hbuf);

'OR

ASSOCIATEDACTIONS("IMPORTBYHANDLE", hbuf);