Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- New script template, only shows processed records
- Assigning any nonzero value to Result will terminate script
- }
- unit userscript;
- // Called before processing
- // You can remove it if script doesn't require initialization code
- function Initialize: integer;
- begin
- Result := 0;
- end;
- // called for every record selected in xEdit
- function Process(e: IInterface): integer;
- var
- el: IInterface;
- begin
- Result := 0;
- // processing code goes here
- if Signature(e) = 'CELL' then begin
- AddMessage('Processing CELL: ' + FullPath(e));
- if ElementExists(e, 'PCMB') then begin
- el := ElementByPath(e, 'PCMB');
- if Assigned(el) then
- RemoveElement(e, el);
- end;
- if ElementExists(e, 'XPRI') then begin
- el := ElementByPath(e, 'XPRI');
- if Assigned(el) then
- RemoveElement(e, el);
- end;
- if ElementExists(e, 'XCRI') then begin
- el := ElementByPath(e, 'XCRI');
- if Assigned(el) then
- RemoveElement(e, el);
- end;
- if ElementExists(e, 'VISI') then begin
- el := ElementByPath(e, 'VISI');
- if Assigned(el) then
- RemoveElement(e, el);
- end;
- if ElementExists(e, 'RVIS') then begin
- el := ElementByPath(e, 'RVIS');
- if Assigned(el) then
- RemoveElement(e, el);
- end;
- end;
- end;
- // Called after processing
- // You can remove it if script doesn't require finalization code
- function Finalize: integer;
- begin
- Result := 0;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement