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

Retrieves the value of a named system property. Some of the available properties are:

  • file.separator - The system file separator character, for example, "/" (unix) or "\" (windows).
  • line.separator - The system line separator string, for example, "\r\n" (carriage return, newline).
  • os.arch - Operating system architecture, for example, "x86".
  • os.name - Operating system name, for example, "Windows XP".
  • os.version - Operating system version, for example, "5.1".
  • user.home - User's home directory.
  • user.name - User's account name.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.getProperty(propertyName)

  • Parameters

String propertyName - The name of the system property to get.

  • Returns

String - The value for the named property.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet
# This script stores the contents of the Text Area component in the users home directory.
homeDir = system.util.getProperty("user.home")
sep = system.util.getProperty("file.separator")
path = "%s%smyfile.txt" %(homeDir, sep)
system.file.writeFile(path, event.source.parent.getComponent("Text Area").text) 
Keywords

system util getProperty, util.getProperty