IMetabaseObjectDescriptor.SetIdNoCheck

Syntax

SetIdNoCheck(Id: String);

Parameters

Id. Identifier to be set for the object.

Description

The SetIdNoCheck method changes an identifier of the object without checking it against the specified format of identifiers.

Comments

It is relevant to use this method if any format of identifiers was set for the repository. If identifier format is not set, to change object identifier it is required to change the IMetabaseObjectDescriptor.Id property.

Example

Executing the example requires that the repository contains an object with the Obj_1 identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.ItemById(
"Obj_1");
    MDesc := MDesc.EditDescriptor;
    MDesc.SetIdNoCheck(MDesc.Id + 
"_Old");
    MDesc.SaveDescriptor;
End Sub UserProc;

The identifier is added to the object after executing this example. The check of correspondence of the set format of identifiers is not performed.

See also:

IMetabaseObjectDescriptor