Dictionary Item

ERDAS IMAGINE Help

HGD_Variant
16.6
HGD_Product
ERDAS IMAGINE
HGD_Portfolio_Suite
Producer

Category: Dictionary

Default

Show All Ports

  • Description

The Dictionary Item operator references the item or items with the specified name or names from a Dictionary. The Dictionary port takes in a Dictionary item, and the Name1 port takes in a String, which is used to search for the item with the matching name in the Dictionary.

Use Add Port from the operator's context menu to add additional Names and Items to the operator. When a port is added to the operator, both a NameN and a ItemN port are added. When a port is removed, the last, or highest numbered, NameN and ItemN ports are removed.

The AllowMissingItem port takes in a Boolean. If true, then if any Name(s) are not found not in the Dictionary object the corresponding output Item(s) will be a null value. If false, the default, this operator will report an error if any name is not found..

After you have set a Dictionary object on the Dictionary port of the Dictionary Item operator, double click the operator to open the Select Dictionary Items dialog (see Select Dictionary Items (dialog)). In the dialog, select which objects in the input Dictionary you want set as the output for this operator. You must first set a Dictionary object onto the Dictionary port before this dialog will be displayed.

Extended syntax for Names

NameN can also be used to reference items that are in a Dictionary which is itself an item in Dictionary, or items of a List which is contained in Dictionary.

Use a period to denote a Dictionary within Dictionary. For example, if Name1 is "D2.StartVal", that would indicate that the item named "D2" in Dictionary is itself a Dictionary which contains an item called "StartVal".

Use square brackets to denote items on a List inside Dictionary. For example, if Name1 is "L[2]", that would indicate that the item named "L" is a List within Dictionary, and the returned Item1 is the item 2 of the list (the third item, since indexing starts at zero).

These notations can be combined, so for example, "Data.DictList[3].FileInfo.Filename[5]" would reference the sixth item of the List "Filename" within the Dictionary "FileInfo", which is a Dictionary, and the fourth item of the list "DictList", which is within the Dictionary "Data", within Dictionary.

  • Connections

Name

Objects Supported

Required

Shown by Default

Default

Dictionary

Dictionary

Name1

String

AllowMissingItem

Boolean

False

Item1

Data

  • Related Operators

Dictionary, (see Dictionary Item) Modify Dictionary Item

  • Syntax

DictionaryItem ( <Dictionary>, <Name1>[, AllowMissingItem=<AllowMissingItem>] )