I don't quite follow your logic for where the images are stored for each model, part, etc. You mention specific filenames, but it appears that your Pictures table has filenames that are named for each model or part. If this is so, then you can add a model or part column to your Pictures table, then use an INFO LOAD to load the picture file references. Then in your chart properties, for the dimension, click Advanced and select Info as Image.
Hi Donald, thank you for your reply.
I tried with INFO LOAD but the thing is that for every single product I have to check if 3 pictures exist in the filesystem.
It takes 15 minutes for every 10.000 products, and we have more than 150.000 at the moment, increasing of 20.000 every year.
Instead, loading at once a table with the filenames of all the pictures takes only 5 minutes.
This is why I would like to find a way to match the 2 tables as I explained in my first post.
I hope someone can help me.
It should not be that slow. I just created a sample that recursed all my folders and loaded every image on my desktop's local drive. For this machine, that's +28,000 images. I loaded all the specifics (folder, filename, ext, size, time) to a resident table, then did an INFO load afterwards from the resident table. The entire load took <45 seconds, and the INFO load was nearly instantaneous (less than a second).
For your application, you should be able to just load a resident table with all your picture files, and then do an INFO load where the first column is the filename (without the ext) and the second column is the full file spec (path and name). Regardless of whether it is ModelCode, ModelPartCode, or ModelPartColorCode, the filename is the actual code value (with .jpg ext), so this should work nicely.
What am I missing? Are you saying that you can load a table in <5 minutes with all images, but then doing an INFO load to load key and imagefilespec from that Resident table is subsequently very slow?
Hi Donald, thank you for your reply.
I don't understand what you are suggesting.
I have 2 resident tables:
1. modelcode, modelpartcode and modelpartcolorcode
2. filename, full path, filetime, filesize of all my pictures.
How would I construct the INFO LOAD statement to have the full path field in the first table?
Your INFO table will have only two columns. The first column is the key with which you identify or associate the record. The second is the full filename with path to your .jpg image file.
In your case, you have 3 types of image files you want to load: Model, Model Part, and Model Part Color. So if you have all the images loaded to a Resident table, that's fine. And it looks like your 'File Name' in this table is essentially the Model, Model Part, or Model Part Color code. So I gather the Model Part Color Code ABC123 has a corresponding image file named ABC123.jpg. An INFO LOAD to load images for these would typically look something like this:
[File Name] As ColorCode, <- this is the key to assoc. w/ your data model
Notice how this table has only 2 columns, and the first is named the same as your ColorCode in your data model. The Full Path is the full file spec to the image file.
You'll do this twice more, and it'll be the same INFO LOAD except [File Name] will be named PartCode, then ModelCode (or whatever your names).
You can put multiple INFO LOADs in the script, one after another. No need to Concatenate (it will not allow), and you won't actually see these tables in your Table Viewer.
Finally, it appears each of the 3 types of images probably can be distinguised by the length of the file name? If so, or maybe you have some other way of knowing for each file in your Resident list the type of image file, then you can add WHERE conditions to each of the Info Loads. So you can Load ColorCodes only when the lenght of the filename is = 14 (or whatever).