Comment: String;
The Comment property determines text of a comment.
Executing the example requires that the repository contains a form with the Form_1 identifier.
Sub Main;
Var
MB: IMetabase;
Update: IMetabaseUpdate;
Root: IMetabaseUpdateFolderNode;
Comment: IMetabaseUpdateCommentNode;
Obj: IMetabaseUpdateObjectNode;
Begin
MB := MetabaseClass.Active;
Update := MB.CreateUpdate;
Root := Update.RootFolder;
Comment := Root.Add(MetabaseUpdateNodeType.Comment) As IMetabaseUpdateCommentNode;
Comment.Comment := "Form dated from " + DateTime.Now.ToShortDateString + " ";
Comment.Label := "Date of update";
Obj := Root.Add(MetabaseUpdateNodeType.Object) As IMetabaseUpdateObjectNode;
Obj.Object := MB.ItemById("Form_1");
Update.SaveToFileNF("c:\UpdateForm.pefx");
End Sub Main;
After executing this example a new update is created. The Form_1 form and comments that have creation date of update are added to the update. After that the update is saved to the file c:\UpdateForm.pefx.
See also: