Templates automatically fill the attribute values with pre-sets made by the users. These pre-sets can be applied to some or all attribute fields to enhance the extraction speed. The templates are also crucial for CAD-based extractions as well. The template functionality is unique to PCS; other software cannot utilize the templates for the SHP files.
When the user creates an SHP file, PCS will automatically create a "_tempaltes" folder next to the SHP file, containing 2 XML files per SHP to store the templates. Modifying these XML files by hand is not recommended; it will surely corrupt the existing templates or templates created after manually modifying the XML files. If the user uses File Geodatabase (FDB), the "_templates" folder will be created inside the FDB folder. When the SHP file/FDB table opens, the Template field will be empty. Users can interact with the templates by right-clicking on the white templates area. If no template is created before, some options will not be available.
The description of the tools are the following (for logical reasons, the description order has been slightly changed):
Add New Template - Add a template by selecting this option. Upon selecting this option, a new window will appear where the template name can be entered.
It will appear in the Template area after adding the name and pressing OK.
Edit template - Edit the selected template, which has been right-clicked. The editor window will open, where the user must choose which columns must be set. After the selection, the user must append the values, which shall be created upon creating a new element. After the pre-set is done, close the template editor. If a column has not been selected for pre-set or left empty, the template will not update that field; it leaves it empty. The TemplateID will become the display name for the template; it can be anything, and it does not affect attributes.
After the template is set and the user selects it in the attribute table, the new elements will receive the attribute pre-sets as set in the template editor.
Edit templates - This option will open the multi-editor, where the user can adjust multiple template values simultaneously. The column selector works the same way here, with a little difference: the not-selected columns are hatched. The multi-template editor is currently not available for FDB.
Copy Current template - This function will duplicate the current template with a different name but the same attribute setting.
Remove Current Template - Remove the selected template from the list
Rename Current Template - Rename the current template
Save Templates - This function saves the templates to files. By default, if the user saves the SHP files, the templates will be saved, but if the user would like to save the templates separately, use this function.
Import Previous Version Templates - This function is essential for users using SHP files created before 2023. In 2023, a new template handling mechanism has been implemented. The old version stored the templates in different formats. These templates are not visible in PCS versions using new template handling (since 2023.01.01). To use these older templates, the user needs to use this function so the software can read the older templates and store them in the current format.
Export Templates to CSV - Export all templates to a CSV file. The CSV file will have the same header as the attribute structure, even if some attributes are not set in the templates.
Import Templates from CSV - Import the templates from a CSV file. The CSV file SHALL HAVE THE SAME HEADER as the SHP/FDB attribute structure. From this aspect, the order of the attributes is also essential; it is not enough if all attributes are there but not in the same order. The user can select the separator character and have a preview of the templates that will be imported. If something does not fit, the software will warn the user that the attribute structure does not meet the CSV. If this happens, it is recommended that a single dummy template be created, exported, and checked if the header fits the user's own CSV file or not. If you run into this error, it will most probably not fit.
Templates in PCS and the export of the templates - it is recommended if several templates exist, prepare them in Excel and import the CSV to the SHP afterwards.
Remove all templates - Clear the template list. If the user already has a set of templates but a new set of templates shall be imported, it is recommended to clear the existing ones before the import.
The user can have as many templates as needed. Inside PCS, the user cannot modify the order of the templates, so if the user wishes to re-arrange the templates, export them to CSV, update them in Excel, and read them back again after clearing the old ones. Suppose the user wishes to use a set of templates commonly, it is recommended to create an empty SHP, set the templates, then back up the SHP as an "empty template", so if upon starting a new project, copy a set of SHP files, and the templates will be already there.