This function is used in Python Scripting.


Returns a process program from the Gateway that was previously sent by a a tool in an S7F3 message.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.



  • Parameters

String ppid - The PPID that was sent from the tool when the S7F3 message was saved.

  • Returns

Dictionary - A Python Dictionary containing the following keys: [editDate, ppbody, bodyFormat].

  • 'editDate' - Holds the last date the program was saved.
  • 'ppbody' - Holds the actual program.
  • 'bodyFormat' - Holds the format ('A', 'B', 'I', etc) of the original message PPBODY.

  • Scope

Vision Client

Code Examples
Code Snippet - Getting Tool Program
# Retrieve information on all programs, and convert them to a PyDataset.
# PyDatasets are easier to iterate over.
results = system.secsgem.getToolProgramDataset()
pyResults = system.dataset.toPyDataSet(results)

for program in pyResults:	
	# If the format of the program is ASCII...
	if program[2] == "A":
		ppid = program[0]
		# ...retrieve more information on the program... 
		programData = system.secsgem.getToolProgram(ppid)
		# ...and print the program. Writing to a file would most 
		# likely be a better practice here.
		print "Program %s: %s" % (ppid,programData[1])

system secsgem getToolProgram, secsgem.getToolProgram