execute ibeblock (
  DatabaseID variant comment 'Internal ID (within IBExpert) of the database associated to the Code Editor
                              (can be NULL or 0 if not assigned)',
  CodeEditor variant comment 'Code Editor object (pointer), reserved for future use',
  ObjectEditor variant comment 'Object Editor object(pointer), parent form of the Code Editor',
  TargetDirectory variant comment 'Initial directory for Save As dialog. User may change it within the block, affects only Save As dialog',
  TargetFileName variant comment 'Target file name. User may change it within the block',
  SaveEncoding integer comment 'Encoding of target file. Possible values are __feANSI, __feUTF8, __feUTF8_BOM, __feUTF16, __feUTF16_BOM.
                                User may overwrite this within the block',
  IsQuickSave boolean comment 'Indicates if there is Quick Save action performed',
  Flags variant comment 'Some additional flags which are represented as set of chars')
RETURNS (
  CancelSave boolean = FALSE comment 'If TRUE, saving will be canceled',
  CancelSaveDialog boolean = FALSE comment 'If TRUE, Save As dialog will not appear')
as
begin
  Exit;

  -- Below is a simple example of possible usage
  if (IsQuickSave) then
  begin
    iObjType = ibec_ibe_GetObjectEditorProp(ObjectEditor, 'ObjectType');
    if (iObjType = __dboProcedure) then
    begin
      sObjName = ibec_ibe_GetObjectEditorProp(ObjectEditor, 'ObjectName');
      TargetFileName = 'D:\QuickSave\Procedures\' || sObjName || '.sp';
      SaveEncoding = __feUTF8;
    end;
  end;
end