Description

Looks up an McObject by its unique TagNumber and ParentMcObject.

Return Type

A McObject object.  

The McObject (S_OK is returned from the function) or Nothing if the specified item was not found (S_FALSE returned from the function).

Syntax

object.LookupByTagNumber (lTagNumber, [piunkParentIMcObject])

The LookupByTagNumber Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McObjects.
lTagNumberRequired. A Long value.

A positive TagNumber property value.

piunkParentIMcObjectOptional. An Unknown object.

The parent McObject instance, or if missing or a NULL pointer, then only an object with no parent is found.

Remarks

Object TagNumbers can be set by assignment to the McObject.TagNumber property or by passing a TagNumber to the Add or AttachAutoAddToCategory methods. All positive TagNumber's must be unique among all McObject instances sharing the same ParentMcObject. These numbers are indexed for fast lookup.