Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 79168964, Entry date: 02/08/2019

How do you import blocks in a STEP 7 (TIA Portal) project that were created in other projects or with earlier versions of STEP 7?

  • Entry
  • Associated product(s)
Data blocks and blocks that were created in the programming languages STL and SCL can also be imported and exported as sources.

You can import source files into your project and generate blocks from them.

  1. In the project tree, under a configured CPU there is the "External Sources" folder. In the project tree you open the "External Sources" folder and click the function "Add new external file".

  2. Navigate to folder where you have stored your source and select that source (a multiselection is also possible). 
  3. Click the "Open" button to import the selected source to STEP 7 (TIA Portal). The source is then stored in the "External Sources" folder.
  4. You then right-click the external source and from the pop-up menu you select "Generate blocks from source" (a multiselection is also possible).
  5. You receive a message informing you that any existing blocks will be overwritten. Confirm with "OK". Now the block is compiled and stored in the "Program Blocks" folder.
  6. The imported block is now available for further program processing.

Proceed as follows to generate a source from a block:

  1. In the project tree you open the "Program Blocks" folder and mark one or more blocks that you want to export.
  2. Right-click a block and in the pop-up menu you select the menu command
  • "Generate source from blocks >  Only selected blocks".
    With this command the marked blocks are generated into a source.
  • "Generate source from blocks > Include dependent blocks".
    With this command all the dependent blocks are also generated into a source.

Further Information
More information is available in the manual "SIMATIC STEP 7 Basic/Professional V15 and SIMATIC WinCC V15" under

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit