Skip to main content

layout

The layout command creates and modifies MultiView layouts: the grids of surfaces and windows that MultiView configurations are built on.

Command TypeDisplayNet
Minimum Version3.x.x
Prefer the editors in DisplayNet Manager

DisplayNet Manager's MultiView layout editor and configuration editor are the recommended way to create and edit layouts.

Usage

layout list
layout descriptions
layout <layoutname> create size <width> <height>
layout <layoutname> window <index> position <x> <y> size <width> <height> offset <x> <y> target <surface>
layout <layoutname> describe
layout <layoutname> save
layout <layoutname> rename <newname>
layout <layoutname> delete
Name first

The layout name comes before the subcommand: layout NewLayout create size 3840 2160. Using layout create NewLayout will silently fail.

On a TCI session, load the MultiView module before using layout, or the command is refused as Invalid command:

require multiview 1.1.0

Subcommands

SubcommandDescription
listReturns a basic list of all layouts
descriptionsReturns a detailed list of all layouts, including each one's surfaces and windows
createCreates a new layout with the given canvas size
describeReturns the detailed description of a single layout
saveStores the layout indefinitely, not just for the current session
renameRenames a layout. The new name must not already be in use
deleteDeletes the layout. Refused while a MultiView configuration still uses the layout; the error names the configurations

If no subcommand is given after the layout name, the layout is modified with the arguments that follow. This is how windows are defined:

layout NewLayout window 0 position 0 0 size 1280 720 offset 0 0 target 1

Window arguments

ArgumentValueDescription
window<index>The window to create or modify
position<x> <y>Placement of the window on the layout canvas
size<width> <height>Size of the window (also used with create for the canvas)
offset<x> <y>Offset of the window content
target<surface>The surface number the window displays. Sources are assigned to surfaces with mtv assign

Examples

Create and save a 2x2 quad layout at 1080p
layout My2x2 create size 1920 1080
layout My2x2 window 0 position 0 0 size 960 540 offset 0 0 target 1
layout My2x2 window 1 position 960 0 size 960 540 offset 0 0 target 2
layout My2x2 window 2 position 0 540 size 960 540 offset 0 0 target 3
layout My2x2 window 3 position 960 540 size 960 540 offset 0 0 target 4
layout My2x2 save
Rearrange an existing layout
layout NewLayout window 0 position 0 0 size 1280 720 offset 0 0 target 1
layout NewLayout window 1 position 1280 0 size 640 720 offset 0 0 target 2

Return value

layout list
{
"status": "SUCCESS",
"request_id": null,
"result": {
"layout": [
{ "name": "compatibility_4k_2x2" },
{ "name": "ControlRoom" },
{ "name": "New_Layout" }
]
},
"error": null
}

Notifications

In async mode, a DN_NOTIFICATION is sent whenever a layout is saved, deleted, or renamed:

Result objectContains
layout_updateThe changed layout descriptions
layout_deleteThe deleted layout names
layout_renameObjects with oldname and newname
layout My2x2 save (surfaces truncated)
{
"status": "DN_NOTIFICATION",
"request_id": null,
"result": {
"layout_update": [
{
"LayoutId": "New_Layout",
"name": "New_Layout",
"width": 3840,
"height": 2160,
"read_only": false,
"surfaces": [],
"windows": [
{
"id": "6d1700b0-b59f-452d-9c0d-e017e1c0a10b",
"index": 0,
"horizontal_position": 180,
"vertical_position": 180,
"width": 1920,
"height": 1080,
"horizontal_offset": 0,
"vertical_offset": 0,
"content": "VIDEO",
"target_surface": 1
}
]
}
]
},
"error": null
}

REST API

Endpoint typeDisplayNet API command
AddressPOST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands.
RoleUser
SubcommandOperationParameters
layoutname action [args]*
create_dashboardlayout_create_dashboardname [args]*
describelayout_describename
descriptionslayout_descriptions
listlayout_list
savelayout_savename [args]*

A parameter in brackets is optional. A parameter marked * takes the remainder of the command line as one string. Pass the text exactly as you would type it on the TCI interface.

See also

  • mtv: build configurations on a layout and route them
  • getinitdata: layout / layout_descriptions datasets