In my script, I saved an ImageDocument to my local drive as a Gatan file. I've used the command ImageDocumentGetCurrentFile() to get that file's path. Now I'm trying to load that file back into my DM workspace using OpenFileForReadAndWrite() with the path I just retrieved, and I'm told "The system cannot find the file specified." (I've also tried OpenImage() and landed at the same issue).
I was able to pass the path into my command prompt, and it was able to recognize the path output by ImageDocumentGetCurrentFile() as valid and open the Gatan file. So, the path seems valid and it doesn't seem to be a problem with my system.
I was curious if anyone else has tips for resolving this issue so that I can open a locally saved file.
Ultimately, my goal is to temporarily remove an image document from my workspace so I can run the menu command "Spectrum > Assign ROI as > Background", which for whatever reason breaks down when images of this type are present (parent images). I've tried calling ImageDocumentHide() on the document before executing the menu command and then ImageDocumentShow() afterwards. This successfully allows the menu command to be executed; however, I learned that when the ImageDocument is shown, the image that was previously displayed is now just a blank white page. I'm not sure what's causing this either.