lr.get_attrib_string

Returns the string value of an argument passed to the script run.

C#

string lr.get_attrib_string( string argument_name );

VB.NET

Function lr.get_attrib_string( ByVal argument_name As String ) as String
Command Line Parsing Functions

Arguments

NameComments
argument_nameThe name of an argument whose value is a string.

The lr.get_attrib_string function returns the value of an argument that was passed to the run of the script.

To view the arguments passed to a script run, see mdrv_cmd.txt in the script folder.

Return Values

Returns the value of the argument as a string. If the argument has no value (for example a flag), an empty string is returned. If the argument does not exist, returns null.

Parameterization

Standard parameterization is not available for this function.

Example

The following example retrieves the host name as a string, checks its validity, and sends it to the output.

string host=lr.get_attrib_string("host");

if(host==null)

lr.output_message("Failed to get the host from the command line");

else

lr.output_message("Host = "+host);