Download ADK User`s Manual (Includes Tecplot GUI Builder)
Transcript
CHAPTER 21 Using Sets A set in Tecplot's ADK is a group or a collection of zones, variables, or line-mappings. The set exists as a convenient way of dealing with groups of numbers. Each number that exists in a set is referred to as a member of the set. The ADK provides the Set_pa type and functions to deal with this type. Several TecUtil functions use sets as parameters. These include the TecUtilZoneSetxxx and TecUtilLineMapSetxxx functions, which allow you to set the attributes of zones and Line-mappings. In this case, you use sets to describe which zones or Line-mappings you want to affect. Also included are several TecUtil functions which alter data. In this case, you use sets to describe which zones and/or variables you want to alter. Another example of when a set is used is with the TecUtilZoneDelete function. Instead of calling TecUtilZoneDelete once for each zone you want to delete, you create the set of zones which you want to delete and call TecUtilZoneDelete only once. The first zone number to be deleted is the first member of the set, the second zone number to be deleted is the second member of the set, and so on. In many cases where a set is used, you may pass NULL to indicate all values. For example, TecUtilReadDataSet takes a parameter which is the set of zones you want to read. If you pass NULL for this parameter, all zones are loaded. To see whether you can use NULL in this manner, check the documentation for the function in question. An important fact to remember is that a set will not accept the addition of a value that already exists in it. In other words, if the set already contains a value of 2, adding another 2 does not change the list of values OR the count of total values. This ensures a compact set without duplicates. If a list is needed that does happen to have repeating values it, is recommended that a string list is used in the place of a set. For details on the TecUtil functions discussed in this chapter, please see the ADK Online Reference. 21.1. TecUtilSet Functions Sets are allocated and deallocated with the following functions: 143