![inductive automation ignition getselectedvalues example inductive automation ignition getselectedvalues example](https://docs.inductiveautomation.com/download/attachments/24453372/2019-10-14_14-27-17.png)
- Inductive automation ignition getselectedvalues example code#
- Inductive automation ignition getselectedvalues example windows#
Using Custom Methods allow you to add functions just like the Script Modules, but attach them directly to a specific component. You might want to have a table contain all the scripting to edit it's contents, or a button that does a complicated check before continuing. Because these events are on components, they are Client Scoped. These functions allow you to do things like configure a cell or create a right-click menu in a table, or change the way the Easy Chart works. They vary for each component and not all components have them because they are so specialized.
Inductive automation ignition getselectedvalues example code#
Because these events are on components, they are "Client Scoped."Įxtension Functions are chunks of code that allow you to interact with some of the basic parts of components that would otherwise be hidden. For example, all of them have the Property Change event, but only components that can be activated have the focus events. Each type of component has a slightly different set of events based on what you do with that component. For example, the following code will access the value of a Tag.Įvery component has " events" associated with them such as when a mouse is clicked, a key is pressed, or a value changes.
![inductive automation ignition getselectedvalues example inductive automation ignition getselectedvalues example](https://docs.inductiveautomation.com/download/attachments/24453372/2020-08-17_11-26-42.png)
Ignition comes with a group of system functions, called the System Library. Using a system function is simple. For example, if a component on a window is running a script, its values are isolated to the client, and the output will be displayed on the Designer/Client output console. "Client Scope" scripts, however, execute on the running client (and also in Designer when testing, but only in Preview Mode). Additionally, some of the system functions like () only work in the "Client Scope," so you will not be able to use them in the script on the Tag.
Inductive automation ignition getselectedvalues example windows#
This means that the script will not be able to access any client level resources such as windows or components that you may have open in the Client. For example, running a script on a Tag is run in the Gateway Scope and the output is sent to the Gateway console (i.e., wrapper.log file) because Tags are stored in the Gateway. This is important because it determines what system functions can be run, what resources the script can interact with, and where the output will be written to. Where a script is run from determines what scope it is running in. Within Ignition, there are two different scopes: the Gateway Scope and the Client Scope. One important thing to keep in mind before scripting in Ignition, is to understand the concept of scope. Project and Gateway event scripts are another major place where Python is used. Each location has it's own events that trigger your scripts to run, and add functionality to your projects in different ways. The most apparent place is in event handlers on components and other objects in Ignition Clients. Python is used in many places in Ignition.