StructFill
StructFill [ /AC=createFlags /SDFR=dfr ] structVar
StructFill is a programmer-convenience operation that initializes NVAR, SVAR and WAVE fields in a structure. At run time, it scans through the fields in the specified structure and attempts to set all null NVAR, SVAR and WAVE fields by looking up corresponding same-named globals in the current data folder or in the specified data folder.
StructFill was added in Igor Pro 8.00.
Parameters
structVar is the name of a STRUCT variable.
Flags
| /AC=createFlags | |||||
| Enables auto-creation of globals. | |||||
| |||||
| /SDFR=dfr | Specifies a data folder. If you omit /SDFR, the current data folder used. | ||||
| See The /SDFR Flag for details. | |||||
Output Variables
StructFill sets the following output variables:
| V_Flag | The number of NVAR, SVAR and WAVE fields that were successfully initialized. | |
| V_Error | The number of NVAR, SVAR and WAVE fields that could not be initialized. | |
If auto-creation is off, a field cannot be initialized if the corresponding global variable, string variable, or wave does not exist. If auto-creation is on, a field cannot be initialized if there was an error creating the global variable or wave.
When using auto-creation, errors are not reported other than via V_Error.
If you unexpectedly get non-zero for V_Error, you can print the structure to see which fields were left null.