RegisterNullRemapping(OldKey: Integer);
RegisterNullRemapping(OldKey: Integer);
OldKey. Object key.
The RegisterNullRemapping method determines objects created by means of zero repeated mapping.
The method is used to create objects with partial loss of structure (information), in case if not all links to external objects are allowed.
Executing the example requires the C:\Update.pefx update file and the object with the 1286399 key in the update.
Add a link to the Metabase system assembly.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UpdateCxt: IMetabaseUpdateContext;
Begin
MB := MetabaseClass.Active;
Update := Mb.CreateUpdate;
Update.LoadFromFileNF("C:\Update.pefx");
UpdateCxt := Update.CreateUpdateContext;
UpdateCxt.RegisterNullRemapping(1286399);
Update.ApplyEx(Null, UpdateCxt);
End Sub Button1OnClick;
After executing the example the object with zero repeated mapping is set up.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
...
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UpdateCxt: IMetabaseUpdateContext;
Begin
MB := Params.Metabase;
Update := Mb.CreateUpdate();
Update.LoadFromFileNF("D:\Logan\test.pefx", UpdateLoadMode.ulmReplace);
UpdateCxt := Update.CreateUpdateContext();
UpdateCxt.RegisterNullRemapping(1286399);
Update.ApplyEx(Null, UpdateCxt);
End Sub;
See also: