15.3.4.4.6 The Script Before Install Page

Dialog Box Controls

Python Package Check
(LabTalk Script)
Add script to this box to prompt users who are installing user-defined Python fitting functions, of Python packages required to use the fitting function. When an end-user drops the FDF file onto the Origin workspace, the script is executed. The page cannot be empty (Python functions only).
  • If required packages have not been installed, the end-user is prompted to allow package install.
  • If required packages are already installed, the end-user is prompted to add the fitting function to a category.

An example script follows. Substitute your required package(s) inside the parentheses and double-quote marks, as needed:

[BeforeInstall]
if(Python.chk("pandas cv2(opencv-python)") > 1)
  return 1;//should not install FDF

return 0;//proceed