Search code examples
ignition

How to insert file path into Text Component


By using the Component Scripting - mouseReleased - Script Editor

path = system.file.openfile()

I have been able to get the following popup. enter image description here

Now what I want is for the selected File's path to be inserted into the original Text Component's Text Property (properly formatted for Ignition).

Like this -

enter image description here

Any and all input is appreciated.


Solution

  • The following script works perfectly.

    path = system.file.openFile()
    if path != None:
        event.source.text = path
    

    We now use the following for this type application.

    enter image description here