Permanent: Boolean;
Permanent: boolean;
The Permanent property indicates whether created object is permanent.
If the property is set to True, after the IMetabase.CreateObject method execution the created object will be saved to the repository. The basic properties will be set for the object. The structure of the object should be edited and the specific properties should be set for efficiency of the object in future.
If the property is set to False, the after the IMetabase.CreateObject method execution a template with the description of the object will be created. It is necessary to open the structure of object in the edit mode, change the necessary properties and save new object using the IMetabaseObject.Save method to make the object available.
By default this property is set to False.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Begin
MB := MetabaseClass.Active;
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_FOLDER;
CrInfo.Id := "NewFolder";
CrInfo.Name := New folder;
CrInfo.Permanent := True;
MB.CreateObject(CrInfo);
End Sub UserProc;
Public Sub Main(Params: StartParams);
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Begin
MB := Params.Metabase;
CrInfo := MB.CreateCreateInfo();
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_FOLDER As Int32;
CrInfo.Id := "NewFolder";
CrInfo.Name := New folder;
CrInfo.Permanent := True;
MB.CreateObject(CrInfo);
End Sub;
A new folder is created in the root folder of the repository root after executing this example.
See also: