Description

The name or ID number of a Category.

Return Type

A Variant value.  

The numeric category ID or string category Name of the category specified in the argument varNameOrID. The name will be returned in a “Namespace::CategoryName” form if the namespace of the type is not the same as the default Namespace property, otherwise just “CategoryName” is returned.

Syntax

object.CategoryNameOrID (varNameOrID)

The CategoryNameOrID Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McObjects.
varNameOrIDRequired. A Variant value.

The Name (VT_BSTR) or ID (VT_I4) of either a McObject Type or Category.

Remarks

Given the Name or ID of an McObjects Category, returns the corresponding ID or Name, respectively. The Category ID is the value returned by the RegisterCategory method.

If the varNameOrID is given as a name, that category name must be within the scope of the current default Namespace, unless the actual namespace is supplied via the “::” syntax.

If an unknown category name is supplied, a category ID of zero is returned. If an illegal category ID is supplied, results are unpredictable and likely to result in program failure.