This is a special function. It isn't necessary to call it, but if it is called, it should be the first function called in the plugin, and it should only be called once. It allows any plugin to specify minimum Family Historian version requirements. And it also allows a plugin (unless it is a read-only plugin) to require or recommend that any unsaved changes made to the current file or project be saved, prior to running the plugin.
It is an error to call this function after calling any function that changes data in any way.
bResult = fhInitialise(iMinVer1 [, iMinVer2 [, iMinVer3, [, strSaveRequirements]])
| save_recommended |
If there are any unsaved changes, a dialog box will tell
the user that saving changes is recommended, and ask if
he/she wishes to save now. The dialog box will have 3
buttons: Yes, No and Cancel. If the user clicks Yes,
changes will be saved, and the function will return
true. If the user clicks No, changes will not be saved
and the function will return false. If the clicks
Cancel, the function will not return, and the plugin will
terminate immediately. |
|---|---|
| save_required | If there are any unsaved changes, a dialog box will tell the user that saving changes is required, and ask if he/she wishes to save now. The dialog box will have 2 buttons: OK and Cancel. If the user clicks OK, changes will be saved, and the function will return true. If the clicks Cancel, the function will not return, and the plugin will terminate immediately. |
fhInitialise(7)
fhInitialise(7,0)
fhInitialise(7,0,0)
fhInitialise(7,0,0, "save_required")
fhInitialise(7,0,0, "save_recommended")