Description: Opens a material-selection dialog for a run. Confirming the selection inserts one RunMaterials record for every selected material with a NULL amount.
Calling convention: CIP_RaceLab_Call_PreselectMaterials("RunID": Integer, "MaterialTypeName": String, ["ActiveMaterialChargeOnly": Boolean = FALSE]): NULL
Parameters:
RunID: existing run database ID; -1 is rejected.
MaterialTypeName: exact configured material-type select-list text.
ActiveMaterialChargeOnly: optional filter; when TRUE, offers only materials with an active charge.
Returns: Always Variant NULL. The caller cannot distinguish confirmation from cancellation by the return value.
Availability: Conditional: available only in builds compiled with CIP_RACELAB. Requires an interactive desktop session, write access and the RaceLab/Chemspeed configuration.
Example:
CIP_RaceLab_Call_PreselectMaterials(RunID, "Raw material", TRUE);