# Macro Language: Buffer Commands

`select <BUFFER>`

Select data buffers.

`setcurrent <number>`

Defines the current working buffer.

`invertselection`

Inverts the selection of data buffers.

`hide <BUFFER>`

Hide buffers.

`show <BUFFER>`

Show buffers.

`delete <BUFFER>`

Delete buffers.

`duplicate <BUFFER>`

Duplicate buffers.

`setcomment <BUFFER> <text>`

Set the comment field of buffers.

`addcomment <BUFFER> <text>`

Add text to the comment field of buffers.

`getcomment <buffer> $<var>`

Defines a string variable with the comment field of the buffer.

`setsource <BUFFER> <text>`

Set the source field of buffers.

`addsource <BUFFER> <text>`

Add text to the source field of buffers.

`getsource <buffer> $<var>`

Defines a string variable with the source field of the buffer.

`belongx <BUFFER> <axis>`

Defines if the buffers belong to the 1. (bottom) or the 2. (top) X axis (possible values: 1, 2, bottom, top).

`belongy <BUFFER> <axis>`

Defines if the buffers belong to the 1. (left) or the 2. (right) Y axis (possible values: 1, 2, left, right).

`addvalue <buffer> <x value> <y value> <x error> <y error>`

Add value pair to data buffer.

`setxvalue <buffer> <index> <value>`

Set X value in the data buffer.

`setxerror <buffer> <index> <value>`

Set X error in the data buffer.

`setyvalue <buffer> <index> <value>`

Set the Y value in the data buffer.

`setyerror <buffer> <index> <value>`

Set Y error in the data buffer.

`rmvalue <buffer> <index>`

Delete value from the data buffer.

`newbuffer`

Add a new empty buffer to the document.

`moveup <BUFFER>`

move the buffer up in the drawing order.

`movedown <BUFFER>`

move the buffer down in the drawing order.