Top  | Previous | Next

Creating Instances

Creating instances of complex types is virtually identical to creating other types of tags using the New Tag menu. Unlike standard tags, it is likely that you'll have to modify attribute values or override certain member properties in order to make the instance unique. The process for doing this is equal to that used when creating data types. Once created, instances run very much like standard tags. If the parent data type is updated, the instance will automatically receive the updates and refresh.

 

Using the Multi-Instance Wizard

The multi-instance wizard provides a powerful but simple mechanism for rapidly generating many instances of a data type, by specifying patterns for parameters. To get started, select "Multi-Instance Wizard" udt_wizard_16 from the tag creation window. Once you select a data type, you will see its parameters come into the table below, where you can specify values for them. The size of the parameter patterns dictate how many tags are created, or if only single values are specified, you can choose to create multiple copies of the same configuration.

 

Value Patterns

In order to define values for parameters (and the tag names), you can use several different types of patterns (and combinations of patterns):

Range        number1-number2[/step]

A numeric range of values, such as "1-10". Optionally, a "step" parameter can be included, in order to only generate numbers at certain multiples. For example, "0-100/10" would generate 0,10,20, etc.

Repeat        value*count

A value (numerical or string), and the number of times to use it. For example, "North Area*10" would use the parameter "North Area" for 10 items.

List                value1, value2, value3

A comma separated list of values (or other patterns) to use.

 

Examples:

1-10,20-30,30-40        Results in 30 tags being created, with the specified value ranges (so, for example, there would be no parameter "15").

A,B,C                Results in 3 tags, with each of the values.

0-100/5                Results in 21 tags (because range is inclusive), with values 0, 5, 10...100.

 

As mentioned, the size of the pattern will dictate how many tags will be created. If some patterns are smaller than others, the last value will be repeated for the other tags.

 

Tag Names

The names of the generated instances can be specified using a system similar to that of the parameter patterns. If you just want to use sequential names, you don't need to specify a pattern, as values will be generated automatically starting at one. You can also set the pattern to simply be the starting number to generate sequential names from there.

Base Name - A string base for the tag name. This can also be a list of names, in which case the names will be used directly, and the name pattern won't be used.

Name Pattern - A pattern that will be used to generate values that will be appended to the base name.

 

At any time, you can use the preview button to view the tag names and parameters that will be created. Once you are satisfied, click ok to generate the tags under the selected folder in the tag provider.