I'm creating templates for tag creation.
Is there any way to create automatically all the subattributes when I create the tag of the main attribute?
I want to do this without expand the main attribute and select all.
You can specify default values for the tag attributes in the template.
For example: pointtype=Timestamp;compressing=0;descriptor=Facility Start of Day Timestamp;engunits=TS;pointsource=AF;shutdown=0
In the PI Point settings in the template, add the attributes after the tag mask, separating them with a semi-colon (;).
Due to "attribute" having 2 possible meanings, can you clarify? A tag (PIPoint) has many PI Point Attributes associated with it. Tim Carmichael 's answer shows some of them. Or an AFAttribute can have child AFAttributes. Are you talking about PI Point Attributes (such as PointType, PointSource, etc.) or are you talking about child AFAttributes?
Since Tim addressed PI Point Attributes, let's say you are talking about child AFAttributes. A lot of people would love to see their tasks automated but doing so would break the pattern for a whole lot of other people. Imagine if you created some attribute limit Trait's. A limit Trait is a child attribute to another attribute. Let's say you want each limit Trait automatically mapped to an underlying PIPoint. What about other customers who want their Traits mapped to Table Lookup or a static value?
Element templates are the best way to allow different databases to automate some of their mappings. Your element template would create a main AFAttribute (guessing it uses the PI Point data reference), and then you would define any Traits and/or child AFAttributes in that template. You would further define how each child attribute would be mapped: PI Point, Table Lookup, static, or other. Once you put your efforts and energy in defining that element template, you would then build out elements with that template. If you have a good naming pattern, then your template would perform the automation that you are hoping for.
If you don't have a good naming pattern, you can consider having a child AFAttribute named "Tagname" which would hold the tag name. For more on this, see:
How can I use a child attribute named 'Tagname' to connect to a PI Point from its parent attribute?
Thanks for your answer. Yes, I'm talking about child AFAttributes.
I have for example this 3 attributes:
Where the attribute LT has 4 other child attributes.
If I right click on them and select 'Create PI Points' just 3 points are created, not 7. I must expand the LT attribute and select the 7 elements for create all of them.
I wonder if there is any way that when I select the main attribute (LT) the child attributes be created as well, without click the + sign.
This is due to the fact that may be a lot of main and child attributes on my template, and I want to avoid a user forget to create a child attribute.
Retrieving data ...