OptionValue

WMA link


OptionValue[name]

gives the value of the option name as specified in a call to a function with OptionsPattern.

OptionValue[f, name]

recover the value of the option name associated to the symbol f.

OptionValue[f, optvals, name]

recover the value of the option name associated to the symbol f, extracting the values from optvals if available.

OptionValue[..., list]

recover the value of the options in list .

Unavailable options generate a message:

The argument of OptionValue must be a symbol:

However, it can be evaluated dynamically:

OptionQ
Options