4/18/2024 0 Comments Wavemetrics igor pro TRIAL![]() ![]() If I make the cache external of the current experiment, I need a way to access that and would end up with waves from that cache inside the experiment which I would then need to delete again. If I do that I would make it hard to continue measuring after saving, currently you can also save during data acquisition and this External cache Thanks both for your I'm no expert on Hook Functions, but couldn't you simply run your cleanup function every time before an experiment is saved ![]() Otherwise, return 1 to indicate that your function is taking over what Igor normally does. In this case, return 0 from the hook functions and, if I am not mistaken, Igor will also prompt the user whether to save an "Untitled" experiment or not. Finally, you could invert the the cmpstr(.) portion of your test and only do the unbidden save if a user had already saved the experiment with a real name. have a CleanUpNeeded() function that returns 0 or 1) and then ask the user for permission. "Do you want to save this cleaned-up experiment?"Īlternatively, I might think that you could check whether cleanup is needed (e.g. ) segment support a DoPrompt call with the Yes/No request? In other wordsĭoPrompt. With some clever programming, you could even sense whether the user had stored a favorite template set that should be restored in place of the default. The downsides are that you move the overhead (time) now taken by the DoCleanup() function to a set of functions akin to WriteToCache() and ReadFromCache() and that you have to decide where the cache file is going to be stored for your package.Īs for saving the experiment without the informed consent of the user. The one added benefit is that you can store a default cache file that can always be restored regardless of how the experiment "went down" (again in a manner of speaking). Have you considered the benefits to have the cache files stored outside of the experiment? The intent is to avoid any need to have to clean up the experiment (e.g. I assume the DoCleanup() is the function to dump the trash in a manner of speaking. Now that experiment resaving takes a lot of time and is potentially dangerous as I'm doing it without the users informed consent. to not make it even more difficult to understand. I'm skipping over BeforeExperimentSaveHook and IgorStartOrNewHook/etc. Which does the cleanup and resaves the experiment again if required in IgorBeforeNewHook but only removes and stops stuff in IgorQuitHook. Static Function IgorQuitHook (igorApplicationNameStr ) If ( !modifiedBefore & modifiedAfter & cmpstr ( "Untitled", IgorInfo ( 1 ) ) ) ![]() Static Function IgorBeforeNewHook (igorApplicationNameStr ) / Revert Experiment, or Open Experiment menu items in the File menu. / Called before a new experiment is opened, in response to the New Experiment,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |