How can I get the name of the open file into a string variable?
Hi there
I have designed a Macro in which I do some measurements in some images and I want to automatically save the measurement files (*.iqm) into the same folder with the same name of the file. However to do that I need to put together the PATH of the image and the NAME of the image and the iqm extension to then save the measurement file.
Any help would be highly appreciated.
I have designed a Macro in which I do some measurements in some images and I want to automatically save the measurement files (*.iqm) into the same folder with the same name of the file. However to do that I need to put together the PATH of the image and the NAME of the image and the iqm extension to then save the measurement file.
Any help would be highly appreciated.
0
Best Answer
-
Hi David,
When you save an image to a TIF file, the measurements are saved together with the file, so it's not necessary to save a separate IQM file.
But if you need it anyway, you can get the image file name using ThisApplication.ActiveDocument.FileName or ThisApplication.ActiveImage.File.FullPathName.
Check this post for an example: http://forums.mediacy.com/discussion/comment/237#Comment_237 .
Yuri0
Answers
-
Hi Yuri
I do not want to modify the original JPG images, since they belong to a bigger project and many people uses them. The measurement files are enough.
I read the post in the link and it solved the problem.
Thank you very much!0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions