The information from the program is telling you the full pathname to the file it has created. It will, as you say, ned to have a unique (known) identifier on the end.
You should be able to create a container field in your FM file and set it by calculation to be:
filewin:[that path name]
But that pathname has to be valid from the x-ray machine's point-of-view, and also your FM machione's. For example, if both are running on the same machine, then the location C:\dental management sofware\Patient Database will be accessible to both.
But if the x-ray machine is on one PC and your FM file is on another, then the same path will point the FM file to the C Drive on its machine.
The most common way is to have both on the same machine, or to share the drive that the image files are stored on and map the same drive letter to it on both machines.
The pathname you have built up is a mixture of finding a file on the local machine's F drive, and then later in the pathname another C drive.
Check first that on the x-ray machine's PC there is a folder at the location C:\dental management sofware\Patient Database (and presumably has files in it). If there is then you know you are looking in the right place. If not: stop there.
Then create a one-line script, Open URL, and set the URL to be "C:/dental management sofware/Patient Database"
Run the script; it should open the folder and display it.
Now check a file name (including the file extension) that is in the folder (or purposely put a file in there, such as a Word document, entitled 'Test'). Amend the URL to include it, such as "C:/dental management sofware/Patient Database/Test.doc"
The script should now open that Word document. That shows you how to create the correct path name, and you will be able to start substituting a different Drive letter (if you want to have the FM file on another machine, for example), and to append the unique file identifier, such as the Patient's ID.
Sorbsbuster thank you for your reply. After reading your post and adding a few steps it worked!
a.Created a calculation field in the patient database with the path where to store the xrays:
b.Created another calculation field with the esternal softwares path on the system
"file://F:/Program Files/Kodak/KODAK Dental Imaging Software/TW.EXE"
c. Created a button on the layout with send event script and placed into calculation:
Quote(Patient::Kodak File Path) & " " & "-P" & Patient::Save kodak file in & " "& "-F" & Patient::Contact Label & " " & "-N" & Patient::Patient ID
Now it is opening the xray software, placing name and patient Id.
Sorbsbuster, thank you for your time.
A correction to the above... After shooting a few xrays I realized that ALL the xrays where appearing on every patients external program interface (Kodak Carestream).
The solution was to modify a bit the path of saving the xrays, so that it could create a separate folder for each patient.
the complete path is :Quote(Patient::Kodak File Path) & " " & "-P" & Patient::Save kodak file in & Patient::PatientID & " "& "-F" & Patient::Contact Label & " " & "-N" & Patient::Patient ID
I was going to say that I was surprised your first pathname worked, but I never like to question something that works. I was particularly thrown by the .EXE suffix on the pathname: '...KODAK Dental Imaging Software/TW.EXE". That is not a pathname to a folder; it's to an executable file.
I don;t know the Kodak software, of course, but if you are able to program it to deliver the image with a known filename to a known dfolder, then you could use the same logic to build the path in your Filemaker file to the same image in the same folder.
If the Kodak software cannot work like that, and you have to pick up each image and 'show it' to the FM system, then you can import the file, export it with a known FM-derived filename, and then re-import it with the standardised filename. We use that method to let people take ID photos, then pick them up as any-old-file-name from their camera card, and automatically rename them and save them to the correct central folder.
The TW.EXE is a Kodak's "special" .exe, so somebody can connect it with an external software. If you would like to simply open the Kodak software, you would execute Kodak.exe .
It is a fantastic Idea to be able to see the xrays directly in FM, but the format of the xrays saved is only readable by Kodak's software. I would need to export them in another format.
I am not sure what you mean by exporting and reimporting, but maybe the above answered the possibilities.
All the best!
Does the documentation give any examples of how a program might interact with TW.EXE?
If they show how a windows command line can do that, there's a way to use send event to open one of those image files.
The summary of the existing documentation I found is actually in my first post, where they try to give you the path.
They describe also that you would have to export a xray from the program in order to save it, for example, as jpeg.
But now it is actually working. I press the button on the patients chart in the solution, it opens automatically the kodak software, setting the patients name and ID and saves it to a created folder. If the folder exists, the program opens the existing xrays of the patient for evaluation or gives you the option to add other images. Than you close the program and you can open the next patient.
It works well!
All the best!