IUBio

(no subject)

David A Schrader dave_s at iastate.edu
Wed Jun 14 08:10:55 EST 1995


I have had the same problem and got around it by changing program name from 
something like xv to my own wrapper which then calls xv or whatever.  I wrote
the wrapper in perl and it allows you to set a couple of environment variables
which point to where you want the images to reside and where you want the 
program to be.  BTW another suggestion that I got when asking this question was
to use a soft link from the externalfiles directory to where ever your images
actually reside.  Here is the perl script that does the work. As you can see it
is very simple:

#!/usr/local/bin/perl
#
# This perl script was written to allow multiple version of acedatabase to access# a single set of image files.  Normally, acedb insists that it has subdirectory
# beneath the present working directory which contains the images.  This would
# be very inefficient in terms of disk usage. This script allows the user to
# preset environment variables that specify the image viewer ( and its full
# path ), and the path to the image files.  xv_hack takes as its arguement, the
# name of the file that is to be passed to the image viewing program.
#
# VARIABLES :
#       IMG_SRC         -full path to directory containing images
#
#       VIEWER_PATH     -full path to the image viewing program. THis MUST end
#                        in / so that the image filename can be appended neatly.
#

#
# get the environement variables and command line arguement
#
$image_name=$ARGV[0];
$img_src=$ENV{'IMG_SRC'};
$xv_dir=$ENV{'VIEWER_PATH'};

#
# form the command line and pass it to the system
#
$command_line=join('',$xv_dir," ",$img_src,$image_name);
print("$command_line\n");
system($command_line);

Hope this helps, 
                  Dave S.
~
~

-- 
===============================================================================
|         Dave Schrader           | But remember, as you stare into the abyss,|
|schrader at mendel.agron.iastate.edu|    so the abyss also stares into you.     |
|       (515) 294-0421            |                -Nietzsche                 |
===============================================================================




More information about the Acedb mailing list

Send comments to us at biosci-help [At] net.bio.net