Field-Map Scripting

4.1.16.9 AddGlobalVariable

AddGlobalVariable procedure


Prototype:

procedure AddGlobalVariable(const Caption_, ScriptName_, Note_ :string);

Description:

Adds an existing global variable to the organizer

Syntax:

AddGlobalVariable(Caption, ScriptName, Note);


Part

Description


Caption

Caption of the variable in the script organizer


VariableName

Name of the global variable


Note

Note that is shown together with the variable name


VariableValue

Value of the global variable

Return value:

none

Note: This procedure is available since version X7.


See also:

Create; Free; Caption; Header; AddGroup; AddSubGroup; AddAttributeScript; AddOnDemandScript; Show; RegistryNameForLastPositionStyle



Example:

var i, j:integer;
  sco:TScriptOrganizer;
begin
  sco:=TScriptOrganizer.Create;
  try
    sco.RegistryNameForLastPosition := 'InventoryCheck_2020';  
  
    sco.Header:='Inventory';
    sco.Caption:='Check data routines';
    sco.AddGroup('Trees','Trees');   
      sco.AddAttributeScript( 'Check heights',
                              'Trees','CheckHeight',
                              'Check heights for all trees');
      sco.AddAttributeScript( 'Check DBH',
                              'Trees','CheckDBH',
                              'Check DBH for all trees');
                              
    sco.AddGroup('Regeneration','Regeneration');
        
      sco.AddAttributeScript( 'Check heights',
                              'Trees','CheckHeight',
                              'Check heights for all trees');
      sco.AddAttributeScript( 'Check DBH',
                              'Trees','CheckDBH',
                              'Check DBH for all trees');
    sco.Show;
    
  finally
    sco.Free;
  end;
end.