Description
Items are added to the list from a source previously saved to by the SaveList method or from another McFeaturesList.
-
Return Type
-
A Long value.
The number of list elements added or merged. The Count property will not have changed if all loaded elements replaced existing items in the list (i.e., HowToLoadList was mchlflMergeWithList and all names matched existing list elements). Count it will have increased by exactly the returned amount if no loaded elements replaced existing items in the list.
-
Syntax
-
object.LoadList (LoadFrom, [HowToLoadList])
The LoadList Method syntax has these parts: |
| object | An expression evaluating to an object of type McFeaturesList. | | LoadFrom | Required. A Variant value. Either a Byte array, a string file name, an IStream object, an IStorage object or an McFeaturesList object. If a Byte array, IStream, IStorage or filename, the LoadFrom source is presumed to be one previously filled with list information by the SaveList method, or if a file name, then it may be an AOI format file written by Image Pro. If an IStorage is supplied, a stream named Contents is opened for loading.
| | HowToLoadList | Optional. A mcHowLoadFeaturesList enumeration, as described in settings. This argument controls whether the items loaded from the list replace the current list, are merged with items of the same name or are appended (with numbers postpended to names, if necessary). The default is mchlflReplaceList.
| Settings The settings for HowToLoadList are:
 | mchlflReplaceList | 0 |
All items in the McFeaturesList collection are cleared before new list items are loaded from the source.
|
 | mchlflMergeWithList | 1 |
Existing items in the McFeaturesList collection are replaced by new items with the same name that are loaded from the source. Loaded items that do not match an existing name are appended to the end of the list.
|
 | mchlflAppendToList | 2 |
If an existing items in the McFeaturesList collection has the same name as an item loaded from the source, then a number is appended to the loaded item's name until there is no name collision. The effect is such that all loaded items are appended to the end of the list, with possibly modified names.
|
Remarks
A file source can be one previously saved to by the SaveList method, or it can be an Image Pro AOI format file.
Exceptions
The source must be well formed and the TypeOfList must match the contents of the source string. This method is currently only supported for TypeOfList equal to mcftEmptyRegions.
|