|Download Help (Windows Only)|
A client file can override the ModelPluginOptions or the ModelPluginConfiguration model callback to inspect or alter the plug-in options an end user configures.
The model calls the ModelPluginOptions callback once for each plug-in instance and passes the instance to the ModelPlugin parameter. Use the subproperties of the Parameters.ModelPlugin.PluginSpecific.Options property to access plug-in-specific options. Use the Parameters.ModelPlugin.Base.SequenceFileName property to determine the plug-in to which the instance data belongs. The model calls the Model Plugin – Initialize entry point for each plug-in instance before calling the ModelPluginOptions callback so you can programmatically initialize or modify the plug-in instance before the model passes the instance to the client sequence file.
The NI_DatabaseLogger and the NI_ReportGenerator plug-ins also provide plug-in-specific DatabaseOptions and ReportOptions callbacks that client sequence files can override to access plug-in-specific options.
The model calls the ModelPluginConfiguration callback one time after calling the ModelPluginOptions callback for every plug-in instance. The model passes the entire set of configured plug-ins to the ModelPluginConfiguration parameter. Iterate through the Parameters.ModelPluginConfiguration.Plugins array to access each configured plug-in.
You can replace or reorder elements of the Parameters.ModelPluginConfiguration.Plugins array. You must ensure that the <NI_ModelPlugin>.Base.RuntimeVariables.InitializationState property is set to zero for each plug-in you add to the array. After the ModelPluginConfiguration callback completes, the process model calls the Model Plugin – Initialize entry point and the ModelPluginOptions callback for each plug-in in the array with a <NI_ModelPlugin>.Base.RuntimeVariables.InitializationState property set to zero.