The IDLitParameter::QueryParameter function method checks whether a parameter is registered, or retrieves a list of the names of all registered parameters.
Result = Obj->IDLitParameter::QueryParameter([ParamName] [, COUNT=variable])
If ParamName is a scalar string, this function returns a 1 if ParamName corresponds to a valid registered parameter, or a 0 otherwise. If ParamName is an array, the result is an array of 1s and 0s. If ParamName is not specified, Result is a string array containing the names of all registered parameters.
A scalar string or string array containing parameter names. If ParamName is not supplied, this function returns a list of all registered parameters.
Set this keyword equal to a named variable that will contain the number of parameters in Result. If ParamName is not supplied, then COUNT contains the number of registered parameters. If ParamName is supplied then COUNT contains the total number of matched parameters.
This example creates an iPlot tool and tests whether a the plot visualization has a registered parameter named "vertices":
IPLOT, RANDOMU(seed, 15)
idTool = ITGETCURRENT(TOOL=otool)
idPlot = oTool->FindIdentifiers('*plot*', /VISUALIZATIONS)
oPlot = oTool->GetByIdentifier(idPlot)
PRINT, oPlot->QueryParameter('vertices')
IDL prints:
1
Continuing the same example, we now query for the names of all parameters of the plot visualization:
Params = oPlot->QueryParameter(COUNT=count) FOR i=0,count-1 DO PRINT, Params[i]
IDL prints:
Y X VERTICES Y ERROR X ERROR PALETTE VERTEX_COLORS
Introduced: 6.1
IDLitParameter::GetParameter, IDLitParameter::GetParameterAttribute, IDLitParameter::RegisterParameter, IDLitParameter::SetParameterAttribute