dialogOpen to open a file in pythonscript


I have a basic question and I really can’t find any documentation.

I have a script that opens a file with the joint values of a robot and passes them on to the robot in VC.
It works quite well.

The next step is to be able to select the file I want to open, without having to go through pythonscript. What I normally do in python is to use filedialog.askopenfile from Tkinter, something that is not supported in VC.

I was able to found the dialogOpen command but, as I am really now starting with programming, I cannot understand how to use it.

If someone could point me in the right direction it would be great!

Thank you in advance

File selection is usually done by creating a property with Uri as value type. The UI will then have a button to select a file and your Python script can have an event handler for the property changing value.