Access a specific parameter, or a number of parameters is accomplished by referencing the parameters by its index number in each of the two different list of customer parameters.  

 

In Custom Scripts references there can be a numeric, or a string parameter type.  Numeric Parameters are indexed in the numeric list of parameters, and the String parameters are listed in the string list of custom parameters.  

 

This means that if there are three numeric parameters, and four string parameters, the numeric list will reference each of the three numeric parameters by a different integer index value, and each of the string parameters will be listed in the string parameter list by an integer index value.  Index values for both types of parameter start at one, and increment up the count of each type of parameter.

 

Parameters are listed in both the numeric list and in the string list by the order in which they are added to their type of parameter list.  Both types of parameters are assigned an integer value that is determined by their left to right order in which they are listed in the custom script call statement.  

 

Syntax:

'  Custom Script numeric parameter access reference
NumericValue = script.parameterList[IndexNumber] '  Numeric
 
'  Custom Script string parameter access reference
TestValue = script.stringParameterList[IndexNumber]     '  STRING

 

Parameter:

Description:

[IndexNumber]

Index number of passed Numeric Parameter.

Index number increments for each Numeric Parameter.

Index position of 1 is assigned to the left-most Numeric Parameter.

Additional Numeric parameters get an incremented value of 1 added their index value.

 

Example:

Parameters are indexed by their left to right placement in the 'script.Execute.' location.

 

In the next statement, there is one String parameter, and two numeric parameters.  The string parameter in the next scripted call statement will assign the String Parameter index value of 1.  In the same statement the left most numeric parameter, 'fFirstNumber', will be assigned an index value of 1 and 'fSecondNumber' numeric parameter will be assigned an index value of 2:

 

'  Custom Function Call Statement Types
script.Execute( tTextValue, fFirstNumber, fSecondNumber )

 

'  Custom Function executing statement values on this next line.
script.Execute( "AddNumbers", 3.40, 0.25 )
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

VARIABLES: textValue                   Type: STRING
VARIABLES: iValue1, iValue2           Type: FLOATING
'  --------------------------------------------------------------
'  Get File item string assigned
fValue1 = script.parameterList[1]
fValue2 = script.ParameterList[2]

textValue = script.stringParameterList[1]

 

Results:

  PRINT iValue1   '  Output will show  3.4
  PRINT iValue2   '  Output will show  .25
  PRINT textValue '  Output will show  3.65

 

Links:

Script, Script Functions, Script Properties

See Also:

 


Edit Time: 2/25/2018 10:27:50 AM


Topic ID#: 457

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software