Skip to content

Client UI API

Client UI API groups every Inscada.* method that is only meaningful in the browser: popup dialogs, value-input widgets, animation / page navigation, SVG zoom, audio. None of these methods exist on server-side ins.*.

Opens a numeric keypad popup bound to a variable; when the user confirms, setVariableValue is called automatically.

Inscada.numpad({
variableName: "SetpointTemperature" // required
// projectName: "otherProject" // optional — defaults to current project
});

Similar to numpad but with a slider UI. The variable’s min/max drive the slider bounds.

Inscada.sliderPad({
variableName: "MotorSpeed_RPM"
});

Opens a text-input popup to write a string to a variable.

Inscada.setStringValue({
variableName: "OperatorNote"
});

A generic, callback-driven numpad not tied to a variable. Forwards the entered number to your handler.

Inscada.customNumpad({
header: "Limit value",
initialValue: 100,
hasNegative: false,
hasDecimal: true,
minValue: 0,
maxValue: 500,
isInteger: false,
sizeScale: 1.2,
onScriptFunc: (xval, extraObj) => {
console.log("Entered:", xval);
},
extraObj: { context: "alarm" }
});
FieldDescription
headerPopup title
initialValueStarting value
hasNegative / hasDecimalAllow negative / decimal
minValue / maxValueBounds
isIntegerForce integers
sizeScalePopup size multiplier
onScriptFunc(val, extraObj)Confirmation callback
extraObjOpaque data passed to callback

Generic virtual keyboard — the text counterpart of customNumpad.

Inscada.customKeyboard({
initialValue: "",
onScriptFunc: (value) => console.log("Entered:", value)
});

Lightweight text-input popup (no virtual keyboard).

Inscada.customStringValue({
initialValue: "notes",
onScriptFunc: (value) => { /* ... */ }
});

Confirmation dialog. type controls the icon / color (info, warning, error, success).

Inscada.confirm("warning", "Attention", "Stop the pump?", {
onOkayFunc: () => {
Inscada.setVariableValue("PumpRun", { value: false });
}
});

Password prompt; verification uses either a static password or a variable’s value.

// Static password
Inscada.showPasswordPopup({
password: "1234",
onPasswordVerified: () => { /* ... */ }
});
// Password stored in a variable
Inscada.showPasswordPopup({
passwordVariableName: "SupervisorPassword",
onPasswordVerified: () => { /* ... */ },
numpad: true // show a numpad for entry
});

Opens the given object in a JSON editor; on confirm, onEditFunc is called with the edited object.

Inscada.objectEditor({
obj: { gain: 1.0, offset: 0.0, threshold: 50 },
onEditFunc: (updated) => {
Inscada.setVariableValue("PidConfig", { value: JSON.stringify(updated) });
}
});

Navigate to one of the system pages (triggers the matching menu selection).

Inscada.showSystemPage({
systemPageName: "alarms"
// pageData: { ... } // optional — data available when the page opens
});

Navigate to the map page and focus the map on a given coordinate/zoom.

Inscada.showMapPage({
lon: 29.0,
lat: 41.0,
zoom: 12
});

Swap the animation currently shown in the viewer.

Inscada.showAnimation({
name: "TankDetail",
parameters: { tankId: 3 }, // optional — parameters for the target animation
unselectMenu: true // optional — clear menu selection
});

Swap the animation one level up from the current one (typical for drill-down “go back”).

Inscada.showParentAnimation({
name: "MainView"
});

Open an animation in a popup window. If size is omitted, the popup auto-fits the SVG’s own dimensions.

Inscada.popupAnimation({
animationName: "TankDetail",
modal: true,
width: 600,
height: 400
});

Extended usage:

FieldDescription
animationNameName of the animation to open (required)
modalLock the background (true / false)
windowIdCustom window ID (replaces a previous window with the same ID)
leftPos / topPosWindow position (pixels)
width / heightSize (omitted → use the SVG’s own size)
extraHeightTitle-bar allowance for dynamic sizing (default 44 px)
__parametersParameters passed to the target animation

Close an open popup window by windowId.

Inscada.closePopup("popupAnimationWindow12345");

Show or hide parts of the main interface.

Inscada.setUiVisibility("top-toolbar", false);
Inscada.setUiVisibility("top-menu", false);
Inscada.setUiVisibility("sidebar-collapse", true);
Inscada.setUiVisibility("animation-toolbar", false);

Valid type values:

typeEffect
"top-toolbar"Show / hide the top toolbar
"top-menu"Show / hide the top menu and menu row
"animation-toolbar"Show / hide the animation toolbar
"sidebar-collapse"Collapse / expand the side menu

Toggle day / night mode.

Inscada.setDayNightMode(true); // night
Inscada.setDayNightMode(false); // day

Reload the browser tab (window.location.reload()).

Inscada.reload();

Programmatic zoom / pan control on an animation SVG.

Inscada.svgZoomPan({
zoomableId: "mainSvg",
functionName: "zoomIn",
params: {}
});
Inscada.svgZoomPan({
zoomableId: "mainSvg",
functionName: "zoomAtPoint",
params: { scale: 2, x: 100, y: 150 }
});
Inscada.svgZoomPan({
zoomableId: "mainSvg",
functionName: "fit",
params: {}
});

Valid functionName values: zoom, zoomBy, zoomAtPoint, zoomAtPointBy, zoomIn, zoomOut, pan, panBy, resetZoom, resetPan, reset, fit, center.

Play / stop an audio file stored in the File System. The same name cannot start twice concurrently.

// Start (looping)
Inscada.playAudio(true, "alarm_siren.wav", true);
// Stop
Inscada.playAudio(false, "alarm_siren.wav", false);
ParameterDescription
isStarttrue to start, false to stop
nameAudio file name in the File System
isLoopLoop mode (only meaningful when starting)