Newbies podulus Posted December 23, 2004 Newbies Posted December 23, 2004 Hello I'm in the process of migrating from FM5.5 to FM7. I have 10,000 records are with file references to image files. Is there a way to automatically store all of the 10,000 images in the db containers, whereby replacing of the references to the files.
Barbecue Posted December 24, 2004 Posted December 24, 2004 First, I'd like to point out that while it's possible to do what you want, it might not be a good idea. Storing lots of graphics will significantly increase the size of your database file, and could really slow down performance, especially if you're working over a network. Storing references is generally more efficient. If you still want to do this, you'll need to do a little scripting and possibly get a third-party plug-in. Using the get(ActiveFieldContents) function on a container field holding a reference will give you some information about the referenced image, including the file path. Create a looping script that retrieves the info, parses out the path, and then use a plugin or some Applescript to retrieve the file by name and insert it into the container field. Here's a list of file manipuation plugins that might be helpful. http://www.filemaker.com/plugins/File.html There's a free file toolbox plugin from Protolight, but it's not available in an OS X version yet, and I doubt if the OS 9 version would work under Panther.
pietschker Posted January 24, 2005 Posted January 24, 2005 I can only support Barbeque's reply. I tried to import 72000 JPG images of about 800 bytes (0.8 kB) each. After 9 hours about 13000 were imported, the database file (otherwise empty) was up to 350 MB, and each image imported slower than the one before. On the other hand, an import by reference took just over 2 minutes. There is one thing that bugged me at first: image imports by reference always use absolute paths (even when you use the script step and define the folder to import by a relative reference). However, the remedy is easy if surprising: Write a text field with GetAsText(<containerfield>); this gives you the absolute reference path. Edit the "absolute part" of the path out of this text (for example with a "substitute" calculation). Then replace the content of the container field by the content of the text field. Sounds horrible, but works- the container field now has a relative path designation and correctly shows the image.
Recommended Posts
This topic is 7312 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now