Creating and handling safety projects
This chapter explains in detail how to create, access and handle safety projects. The following list contains all chapters of this article:
- General information about safety projects
- Opening existing safety projects
General information about safety projects
- The TwinCAT Automation Interface enables existing TwinCAT safety projects to be imported into the TwinCAT configuration. For this purpose, users can use either the corresponding *.splcproj file or the container format *.tfzip as the source template.
Opening existing safety projects
To open an existing safety project using Automation Interface, you must navigate to the safety node and then execute the CreateChild() method with the path of the corresponding safety project file as a parameter.
You can use three different values as SubType:
- 0: Copy project to solution directory
- 1: Move project to solution directory
- 2: Use original project location (if used, use
""as project name parameter)
Basically, these values represent the functionalities (Yes, No, Cancel) of the following MessageBox in TwinCAT XAE:

You can either use the path to the safety project (or its *.splcproj file) that needs to be added or you can use the safety project archive file (*.tfzip).
Code snippet (C#):
ITcSmTreeItem safety = systemManager.LookupTreeItem("TISC");
ITcSmTreeItem newProject = safety.CreateChild("NameOfProject", 0, null, pathToProjectOrTfzipFile); Code snippet (PowerShell):
$safety = $systemManager.LookupTreeItem("TISC")
$newProject = $safety.CreateChild("NameOfProject", 0, "", pathToProjectOrTfzipFile)