Template block

A Template block is an Architect block that contains a reference to an external blueprint template.  

Return to Overview of blocks

The template block contains a reference to an external file called a User Template.  User templates are pre-configured blueprints and/or superblocks that have been created according to specific requirements and exported as .cut files. When a blueprint contains template blocks, the external file is not loaded into the current blueprint until the blueprint is expanded.  Thus any changes to the external file are read in by the blueprint at design-time.  In order to deploy the blueprint at run-time, the blueprint must first be expanded to read the most current version of the external template file and include it in the blueprint.

NOTES:

Blueprints that contain templates cannot execute at design-time or run-time.  Use the Expand option on the Templates menu.

Blueprints containing template blocks must be checked for runnability using the Full Runnability Check option on the Templates menu.

Convenience of a template block

Template blocks serve as a "wrappers" for the blueprint functionality contained. No data sources or sinks are attached - the number of input and output ports are determined by the blueprint design. This makes it convenient for the template block to be exported and the functionality reused on different data sources.

To change the functionality of template blocks, edit the blueprint according to your new requirements. On saving, the new functionality is saved for that template block, and will be implemented automatically when the template block is expanded before deployment. It is therefore not necessary to make individual changes for each blueprint using the template block. That is why you need to expand the block before deploying.

Creating a template block

When a template block is created, a folder containing the CUT file is automatically generated in the following directories:

  • For Windows XP, Windows Server 2003: C:\Documents and Settings\All Users\Application Data\Proficy CSense

  • For newer versions of Windows (including Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2): C:\ProgramData\Proficy CSense

To add the template to the template palette, simply right-click and select [add to template palette]. If you are sent a template block from someone else, then first save the template file in the folder in the above directories, before opening it in Architect.

Template block

Block Type

General

Functions performed on tags

Determined by the design.

Expanding your template blocks

Blueprints containing template blocks cannot execute since they do not contain all the relevant information (CUT files are only referenced and are not imported into the blueprint) in order to execute. Blueprints containing template blocks must first be expanded.  The expanded version of the blueprint is then used for deployment or offline simulation in the Architect.

To Expand your template blocks:

  1. From the Templates menu select the Expand option.

  2. Specify a location for the expanded blueprint.

The expanded version of your blueprint now contains the most recent external template files imported as superblocks into the blueprint itself and may now be deployed in real-time or simulated in the Architect.

Checking for Runnability

In order to check the runnability of a blueprint containing template blocks, a special runnability check must be done on all external referenced user template files.  

To check the runnability of a blueprint containing template blocks:

  1. Go to the Templates menu.

  2. Select the Full Runnability Check option.

NOTE: If you make use of a Feedback block within a template block, the feedback stream may not go outside the template block, but must be contained inside the template block.

Template block palette

The template block palette in the Architect refers to a special block palette that displays all the user template blocks that have been added to the palette.  The palette itself actually refers to a folder on the hard drive where all the template files are stored.  These storage folders are found in the following directories:

  • For Windows XP, Windows Server 2003: C:\Documents and Settings\All Users\Application Data\Proficy CSense

  • For newer versions of Windows (including Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2): C:\ProgramData\Proficy CSense

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025