Skip navigation
All People > dfsoll > David Soll's Blog > 2017 > November

In AF, when you create a new PI Point AF Attribute template in an AF Element template, you will notice that the default setting for this attribute is: \\%Server%\%Element%.%Attribute%".  Care should be taken when using the %Server% replacement parameter as it may resolve in a way that you might not expect.


The %Server% replacement parameter will use the default PI server based on the AF client that you are using.  This means that when a user adds an element using the PI System Explorer from their own workstation, the %Server% will be substituted with that user's default PI server.  If your organization has more than one PI server, this could be a problem.


A better solution might be to have an attribute named "PI Server" and utilize that attribute in the configuration string.  If the "PI Server" attribute is defined in an AF Element template that is used as the base template for all other AF Element templates, you could define it as a "String Builder" type with "'..\|PI Server'" as its configuration string.  This will cause the "PI Server" attribute to always be available in every element as well as inherit the "PI Server" value from its parent.  You only need to set the "PI Server" value in the root node of your AF Element hierarchy.

Each AF attribute has a set of properties associated with it.  Beginning with PI-AF version 2015 (, there is an "Excluded" property.  This property allows the exclusion of a property from the AF database.


Why would you want to exclude a property rather than just removing it?  The primary purpose of having the Excluded property is to allow attributes that were defined in an AF Element Template be excluded from a particular instance of an element that is derived from a template.


Here's an example: Suppose that you wanted to create a template of a computer and you were defining attributes for the disk drives, let's say, the size of the disk.  You could create an attribute in the template named "Drive C: Size", which will work fine, but many computers also have a D: drive.  Previous to AF 2015, you would either create an additional attribute in the element that is not inherited from the template, or create a "Drive D: Size" in the template and set the value to 0 for those computers that don't have a D: drive.  In AF 2015 or greater, you can create the "Drive D: Size" in the template and simply mark it as "Excluded" in the elements for computers without a D: drive.


Attributes in a template can be marked as "Excluded", then the exclusion can be turned off once instantiated in an element or the attribute in the template is not excluded but in the inherited element you can exclude it.


Note that the PI System Explorer, by default, show excluded attributes.  This can be disabled (or enabled) by clicking on the "Tools - Options" menu option and clicking on the "Show Excluded Attributes" check box.