Skip to main content
Version: V2 (Ignition 8.1)

system.mes.dashboard.saveWidget

Description​

Creates or updates a Dashboard Widget in the system based on the provided parameters.

Permissions​

This method requires the DASHBOARD.WRITE.SAVE permission.

Syntax​

system.mes.dashboard.saveWidget(**widget)

Parameters​

ParameterTypeNullableDescription
nameStringFalseThe user-friendly name of the widget.
descriptionStringTrueDescription of the widget functionality.
viewPathStringFalsePath to the Ignition View that renders the widget.
iconPathStringTruePath to an icon for the widget.
categoryStringTrueCategory of the widget.
defaultWidthIntegerFalseDefault grid width of the widget.
defaultHeightIntegerFalseDefault grid height of the widget.
minWidthIntegerFalseMinimum grid width allowed.
minHeightIntegerFalseMinimum grid height allowed.
idString (ULID)TrueThe ULID of the widget (optional, for updates).
notesStringTrueNotes related to the widget.
enabledBooleanTrueIndicates if the widget is active and enabled.
spare1StringTrueAdditional field for user-defined context.
spare2StringTrueAdditional field for user-defined context.
spare3StringTrueAdditional field for user-defined context.

Returns​

Returns a JSON representation of the saved widget.

Code Examples​

w = system.mes.dashboard.newWidget()
w['name'] = 'Time Series'
w['viewPath'] = 'Mes/Widgets/TimeSeries'
saved = system.mes.dashboard.saveWidget(w)
print(saved)