FabyaVisionUser Manual
/

Script object model reference

6 min readScripts

A language-by-language reference of the objects and functions that can be accessed from scripts: common concepts, a comparison table of the languages, the VBS and JavaScript object model. Python and C are in separate topics.

How to read this reference

Only the members that the engine actually recognizes are listed here. The Reference panel in the code area (VBS, C and Python) gives the same data together with sample code; clicking a row inserts the sample at the cursor. Detailed lists for Python and C are in the topics Python object model and C functions.

Common concepts

Tag value types

Tag typeVBSJavaScriptCPython
Boolbinary value (1 / 0, True / False)true / falseGetTagBit (1 / 0)bool
Integer typesnumbernumberByte, SByte, Word, SWord, DWord, SDWordint
Real / LRealnumbernumberGetTagFloat / GetTagDoublefloat
String / WStringtexttextGetTagCharstr
DateTimetext (ISO format)textGetTagDateTimeISO str

Quality codes

VBS (QualityCode), C (…StateQC) and Python (.quality) use the same codes: 192 good, 84 value outside the tag's lower / upper limit (the value is usable), 8 no connection, 4 undefined (tag not found), 0 bad.

System tags

Special names that start with @ and can be read if no tag with the same name is defined in the project:

NameMeaning
@LocalMachineNameThe name of the Live PC.
@CurrentUser, @CurrentUserNameThe name and display name of the logged-on user (empty if there is no session).
@UA_<Rapor>_ID, @UA_<Rapor>_JobAdds a record to the report named <Rapor> now: first -1 is written to _ID, then 6 to _Job. When the record has been added, Job becomes 0 and ID becomes the new record number; if the report does not exist or another Job value is given, Job becomes −1 and a warning is written to the event log.

For creating a report record, scada.report_add("Rapor") is shorter in Python. Report side: Report design.

Comparison by language

The — sign indicates that there is no equivalent in that language.

OperationVBSJavaScriptCPython
Read tagHMIRuntime.Tags("Ad").Read or SmartTags("Ad")Tag.oku('Ad')GetTagFloat("Ad")scada.read("Ad")
Write tagHMIRuntime.Tags("Ad").Write 1 or SmartTags("Ad") = 1Tag.yaz('Ad', 1)SetTagFloat("Ad", 1.0f)scada.write("Ad", 1)
Quality / state.QualityCode, .LastError—GetTagFloatStateQC("Ad", &d, &k)scada.tag("Ad").quality
Several tags togetherTags.CreateTagSet—GetTagMultiWaitscada.read_many, write_many, tagset
Open screenHMIRuntime.BaseScreenName = "Sayfa"Sayfa.ac('Sayfa')OpenPicture("Sayfa")scada.open_screen("Sayfa")
Previous screen—Sayfa.geri()OpenPrevPicture()scada.back()
Pop-up window——OpenScreeninPopup(…)scada.open_window("Sayfa")
Object propertyScreenItems("N").Text = "x"—SetText("Sayfa", "N", "x")scada.screen.items["N"].text = "x"
Show / hide layerScreens("S").Layers(1).Visible = False——sayfa.layers[0].visible = False
Logged-in userHMIRuntime.Tags("@CurrentUser").ReadKullanici.adPWRTGetCurrentUser (UseAdmin.dll)scada.user
Login window——ShowLogonDialog()scada.login_dialog()
Message / confirmation windowMsgBoxBildir(metin) (information only)MessageBoxA (user32.dll)scada.msgbox(…), scada.notify(…)
Prompting for a valueInputBox——scada.inputbox(…)
Live languageHMIRuntime.Language = 1033—SetLanguage(1033)scada.language = 1033
Values between scriptsHMIRuntime.DataSetAdding to windowfile-level variablescada.dataset
Adding a record to a report@UA_Rapor_ID / _Job——scada.report_add("Rapor")
DatabaseADODB.Connection——scada.db.connect(…), pyodbc
FileScripting.FileSystemObject—fopen, fprintfopen(), os, pathlib
Start programWScript.Shell.Run—ProgramExecutescada.run(…)
Waiting(DateDiff loop)setTimeoutSleep(ms)scada.sleep(sn), scada.wait_for(…)
Diagnostics outputHMIRuntime.Trace—printf, TraceTextprint, scada.trace
Exit LiveHMIRuntime.Stop—DeactivateRTProject()scada.stop()

VBS object model

Object member names are not case-sensitive. For CreateObject objects that require permission, see VBScript scripts.

HMIRuntime

MemberDescription
Tags("Ad")Tag object (same as Tags.Item("Ad")).
SmartTags("Ad")Reads the value of the tag; SmartTags("Ad") = v writes it.
Screens("Sayfa")An open screen (main screen, pop-up window, inside a screen window). A closed screen is not in the list; Screens.Count and For Each work.
ActiveScreenThe screen in front.
BaseScreenNameName of the main screen; assigning it opens that screen.
LanguageLive language number (1055 Turkish, 1033 English, 1031 German); if assigned, the language changes.
ActiveProject.Name, .PathName and folder of the project.
DataSetValues shared by all scripts and kept in memory for the whole session.
CurrentContextThe context from which the script is called.
Trace "metin"Writes a line to the event log and to script diagnostics.
StopSends a request to close Live.

HMIRuntime.Logging, AlarmLogs, DataLogs, Alarms and MenuToolBarConfig are not available in this version (an error occurs if they are called).

Tag, TagSet

ObjectMembers
TagRead([kip]), Write [değer], Value (default property), Name, QualityCode, TimeStamp, LastError, ErrorDescription, TagPrefix
TagSet (Tags.CreateTagSet)Add, Remove, RemoveAll, Read, Write, Item / grup("Ad"), Count, LastError

The mode parameter of Read and the mode parameter of Write are accepted but make no difference: a write is always sent to the driver immediately and awaited.

Screen, ScreenItem, Layers, DataSet

ObjectMembers
ScreenObjectName, ScreenItems, Layers, DataSet, ActiveScreenItem, Parent, AccessPath, Activate(), Refresh(), Width, Height, BackColor, Zoom, Enabled, TagPrefix
ScreenItemObjectName, Type, Left, Top, Width, Height, Visible, Enabled, Layer, Parent, TagPrefix, ToolTipText, Activate(); common names: Text, BackColor, ForeColor, BorderColor, FontName, FontSize, FontBold, FontItalic, FontUnderline, ProcessValue, OutputValue, RotationAngle, Transparency, FlashingEnabled; also the object's own property names in the Properties tab
LayersLayers(no) (in VBS 1 = layer 0): Visible, Name, MinZoom, MaxZoom
DataSetAdd "ad", değer, DataSet("ad").Value, Remove, RemoveAll, Count

A value written as an object property is valid for the duration of the session; it is not written to the project file. If the property is bound to a tag, the binding wins. Logical properties (Visible, Enabled …) return a real Boolean. In event code (Run VBS code), the names Item, ScreenItems, Parent, Layers, DataSet are used directly.

Err

Number, Description, Source, Clear, Raise numara, kaynak, açıklama.

JavaScript object model

MemberDescription
Tag.oku(ad)Returns the current value; undefined if the tag does not exist.
Tag.yaz(ad, değer)Writes a value and returns a Promise; a rejected write is shown to the operator as an error window.
Sayfa.ac(ad, [önek])Changes the main screen.
Sayfa.geri()Previous screen.
Bildir(metin)Shows an info window.
Kullanici.adThe name of the user in the session (empty if none).

There are no other members: if you write a name that is not under Tag., Sayfa. or Kullanici., Studio warns about it during compilation.

Limitations and points to note

  • Generating and acknowledging alarms and accessing archive and alarm logs are not available in any language (for calls that are defined in C and Python but do nothing, see the relevant topics).
  • VBS, C and Python can change object properties; JavaScript cannot. Writing object properties is not supported in a 3D screen.
  • The "Unsupported" tabs in the Reference panel give the current list of the calls that Studio warns about in advance.

Related topics

FabyaVision 0.1.0 User Manual · 18 October 2026© Fabyatek Yazılım Bilişim Teknolojileri Ltd. Şti.