User Manual

GETTING STARTED


OTHER EDITIONS


LAUNCHERS


MODULES


PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support

ALL USER MANUAL VERSIONS

Ignition 8.1. Offline Version (04/2021)
Ignition 8 Online Version
Ignition 7.9 Online Version
Ignition 7.8 Online Version

Deprecated Pages

SDK Documentation

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

Prompts the user to save a new file named filename. The optional extension and typeDesc arguments will be used for a file type filter, if any. If the user accepts the save, the path to that file will be returned. If the user cancels the save, None will be returned.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.file.saveFile(filename)

  • Parameters

String filename - A file name to suggest to the user.

  • Returns

String - The path to the file that the user decided to save to, or None if they canceled.

  • Scope

Vision Client

Syntax

system.file.saveFile(filename, [extension], [typeDesc])

  • Parameters

String filename - A file name to suggest to the user.

String extension - The appropriate file extension, such as "jpeg", for the file. [optional]

String typeDesc - A description of the extension, such as "JPEG Image"[optional]

  • Returns

String - The path to the file that the user decided to save to, or None if they canceled.

  • Scope

Vision Client

Code Examples
Code Snippet - Saving a File
# This code prompts the user to save the text in a text area to a file.
 
path = system.file.saveFile("myfile.txt")
if path is not None:
   system.file.writeFile(path, event.source.parent.getComponent("Text Area").text)
Keywords

system file saveFile, file.saveFile