Jump to content

Adding pictures to Program Stop.


---
 Share

Recommended Posts

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

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

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.

BAT file location.jpg

BAT Format.jpg

  • Like! 2
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

  • Like! 1
Link to comment
Share on other sites

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

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

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

  • Like! 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...