[Ri...] Posted Monday at 05:47 PM Share Posted Monday at 05:47 PM When you add a picture to a Program Stop, it pops up a picture at the stop. However, if you save the program to a different name the Program Stop loses the picture link. I use dates as a suffix to my programs for revision control, it is not uncommon to save a program with a new date suffix. Is there a way to maintain the picture links? Link to comment Share on other sites More sharing options...
[Ri...] Posted Monday at 05:59 PM Author Share Posted Monday at 05:59 PM I think I found a way to modify this. Edit "inspection" file, search for "#pathOfFile:" Change the path associated with it to the new file name. I'll post back later if it works. Link to comment Share on other sites More sharing options...
[Cl...] Posted Monday at 06:08 PM Share Posted Monday at 06:08 PM Where are you saving the picture? If you are saving it inside the program folder it might that the file address is no longer valid you could try making a dedicated fold of pictures. Alternatively, you could use a BAT file to make a picture popup when you open a program. A super simple one I use all the time is start "" "file address\picture.jpeg". If you save that as inspection_post_load.bat and drop that in the program folder that will open a photo first thing when the program is opened. 2 Link to comment Share on other sites More sharing options...
[Ri...] Posted Monday at 06:12 PM Author Share Posted Monday at 06:12 PM Please sign in to view this quote. Does not appear to work. Link to comment Share on other sites More sharing options...
[Ri...] Posted Monday at 07:01 PM Author Share Posted Monday at 07:01 PM (edited) The path being reported as invalid, is valid. This leads me to believe there is something else that retains the original path and uses the "#pathOfFile:" as a text place holder. The only way to fix it right now is to edit each feature that has a picture associated to it, and that's quite a few. It would be time consuming. This is the text in the "inspection" file I am editing. (Blue=Path, Red=File name). #OMTecProgStop #comment: '' #'container$' 'container' #settings: #( #OMSettings) #definitions: #( #OMParameters #'container$' 'container' #recalculate: true #dict: #( #Dictionary) #parameters: '') #text: 'Insert best fit Gage Pin (Ø.125).' #pathOfFile: 'C:\Inspections\56683-3_B_Op40-50_2 of 2_05-09-2024\935 .1562-.1577 Pins.PNG') Edited Monday at 07:08 PM Link to comment Share on other sites More sharing options...
[Mi...] Posted Wednesday at 09:07 AM Share Posted Wednesday at 09:07 AM You have to change the entry in the inspset and autoruninf file, too. These are labeled by #progStopUserInfo. For instance, you have a picture C:\Temp\test.JPG, then you have to change in the inspection file (as you've already done) #pathOfFile: 'C:\Temp\test.JPG') as well #progStopUserInfo ' ->' 'C:\Temp\test.JPG') the inspset and autoruninf file. 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 10:47 AM Author Share Posted Wednesday at 10:47 AM Please sign in to view this quote. Neither the inspset or autoruninf files had paths to the images, just the image name. The image name hasn't changed, just the path due to a program name change. The inspection file has a path to the image files. Link to comment Share on other sites More sharing options...
[Mi...] Posted Wednesday at 11:08 AM Share Posted Wednesday at 11:08 AM Please sign in to view this quote. You can add the path to the image name. Just try Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 11:52 AM Author Share Posted Wednesday at 11:52 AM I have 16 program stops in the "inspection" file. The other two files you noted, have a single entry in each for the same image. Only one "#progStopUserInfo" entry is found in those other two files. Link to comment Share on other sites More sharing options...
[Je...] Posted Wednesday at 12:37 PM Share Posted Wednesday at 12:37 PM I allways hated it, to work withe program stop. I realised it (works only when running from feature) with pcm: I have theoretical features where I need the pictures, in pre- or postparameters I have : systemCall(getActualInspectionDir()+"\1.bat") message("Weiter") that calls a .bat, that calls the picture, like: @ECHO OFF "%~dp0\1.JPG" works well from any folder 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 02:17 PM Author Share Posted Wednesday at 02:17 PM Please sign in to view this quote. If this works with basic PCM, I will try it. Link to comment Share on other sites More sharing options...
[Ch...] Posted Wednesday at 02:22 PM Share Posted Wednesday at 02:22 PM I'd agree a safer method that would survive renames, would be to use PCM and .bat file. Link to comment Share on other sites More sharing options...
[Ri...] Posted Wednesday at 02:39 PM Author Share Posted Wednesday at 02:39 PM In the .bat file, this string: "%~dp0\1.JPG" What does "%~dp0" provide? Link to comment Share on other sites More sharing options...
[Ma...] Posted Wednesday at 03:13 PM Share Posted Wednesday at 03:13 PM Please sign in to view this quote. https://stackoverflow.com/questions/5034076/what-does-dp0-mean-and-how-does-it-work 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in