Home

Cardbox Talk

 

CardboxForumsCardbox Talk > "Export Images"

Export Images

Can Images be exported out of Cardbox

Current user: [none]
Register / Log In · Help

Posted By Post

aideenc

28-Oct-2011 10:51

I'm trying to export images from Cardbox. When I export the records the IM field is not enabled. Any help would be appreciated. Thanks

bert

28-Oct-2011 11:28

Hi,
A really missing feature in Cardbox. Workaround: batch export you can do by macro.

However, you did not write exact what you want:
- export all images of a selection?
- export all images of one record?
- export all images of a record, all records in a selection?
- Save as JPG or BMP? (JPG decrease image quality a little in your export files)
- Which format you want for your file names?
If you only want to export one image of a record: right mouse click on the image : save as.

regards
bert

aideenc

28-Oct-2011 13:12

Hi Bert, I'm trying to export all images of a selection and save the images as bmp. There's one image per record. There are over 2000 records which is why I don't want to do the save as option!

bert

28-Oct-2011 13:30

Well, then is a basic macro:
(it can be faster etc, but this should work)
File name is generated by the record number of your selection
If there is a record without an image, or the file name already exists, an error message is showed by Cardbox.

Succes,
bert

'first click on a file in a folder. That is the folder where you want to drop your files.
   fld=GetOpenFilenames("All Files (*.*)|*.*",,"Click on a file in the destination folder",cbxGetFilenamesWithPanel)
   sl = instrRev(fld,"\")
   fld = left(fld,sl)

'from current record until last record of your selection, save the (one and only) image as bmp:
for x = Recordposition to Records.Count
   Set arec = ActiveRecord
   Set img = arec.Images.Item(1)
   img.WriteToFile fld & x & ".bmp"
   nextRecord
next

aideenc

2-Dec-2011 12:19

Hi Bert, thanks for that Macro it works except that it stops when it reaches a record that has no image. I'm not technical is there any way to get it to run through the whole collection and export all the images.

Aideen

bert

2-Dec-2011 13:15

thats it:

for x = Recordposition to Records.Count
   Set arec = ActiveRecord
   if arec.images.count > 0 then
      Set img = arec.Images.Item(1)
      img.WriteToFile fld & x & ".bmp"
   end if
   nextRecord
next

r.
bert

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home