<folder> Element
This element defines the folder to be created under the 'Application' node in the PLANT. Using the element you can create folder structures which allow you to organize the HMI pages in the PLANT. The creation of a folder is triggered by the existence of an IEC code element (for example, FB instance, program instance, variable etc.) defined by the descendant <on...> element such as <onfunctionblock> or an HMI page defined by the descendant <onpage> element.
The nesting of <folder> elements is permitted (see the example below). There is no limit on nested <folder> elements.
Parent element: <generation>, <folder>
Attributes:
Attribute | Description | Type / Required |
---|---|---|
displayname | Name of the folder to be created. Placeholders enclosed in @ can be used. | Type: stringRequired: yes |
required | If set to "true", an empty folder is created even the folder contains no descendant <page> or <folder> elements. If set to "false" or if the attribute is not used, no folder is created if the folder has no descendant <page> elements. | Type: boolean true or false (default)Required: no |
unique | Specifies whether the folder should be created once or as many times the element exists that triggers the creation.If set to "true", the folder is created once, even if the triggering element exists two or more times in the project. | Type: boolean true or false (default)Required: no |
Example:
In the following example, the folder 'SampleFolder' and the folder 'TopFolder' with the nested folder (subfolder) 'Level1' are created. The creation of all folders is triggered by the existence of the FB instance 'RobotFB' defined by the descendant <onfunctionblock> elements. Setting the 'required' attribute to "true" for the 'SampleFolder' ensures that the folder is created even it contains no descendant <page> / <folder> element.