Skip to main content
Version: 8.1

system.project.getProjectName

This function is used in Python Scripting.

Description

Returns the name of the project where the function was called from. When called from the Gateway scope from a resource that originates from a singular project (reports, SFCs, etc.), will return that resources project. Resources that run in the Gateway scope, but are configured in a singular project (such as a report), will use that project's name.

When called from a scope that does not have an associated project (a Tag Event Script), the function will return the name of the Gateway scripting project. If a Gateway scripting project has not been configured, then returns an empty string.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.project.getProjectName()

Parameters

Nothing

Returns

String - The name of the currently running project.

Scope

Gateway, Vision Client, Perspective Session

Code Example

Code Snippet
# This code displays the name of the currently running project to the appropriate console,
# depending on scope (Designer console, Gateway console, etc.).
system.util.getLogger("myLogger").warn("You are running project: %s" % system.project.getProjectName())

Keywords

system project getprojectname, project.getprojectname