Date: Fri, 7 Feb 2003 13:22:26 -0500
Reply-To: Randy Herbison <RandyHerbison@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Randy Herbison <RandyHerbison@WESTAT.COM>
Subject: Re: Calling Image Editor in AF
Content-Type: text/plain; charset="iso-8859-1"
Tim,
Here is an example passing an SCL variable as part of the image name:
dcl string(3) image;
/* Display image "forest.bmp".
Break image name to show how to combine SCL variable name
and string to create dynamic image name */
init:
image='for';
call execcmd ('image; zoom on; import "c:\windows\' || image || 'est.bmp"
"format=bmp"');
return;
RandyHerbison@westat.com
-----Original Message-----
From: Tim Obrey [mailto:tobrey@PREXAR.COM]
Sent: Thursday, February 06, 2003 8:05 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Calling Image Editor in AF
I did not have any success resolving the SCL variable. I was able to
use the following code to display a bmp:
MAP:
call execcmd ('image; zoom on; import "c:\photos\0298map.bmp"
"format=bmp";');
RETURN;
But when substituting the SCL variable WAT in the path
("c:\photos\wat.map.bmp" or "c:\photos\&wat.map.bmp" ) The Image
Editor window opened but there was no image and there was no error
message in the LOG. I do know that WAT was resolved correctly in
other labeled sections of the program.
Is it possible to use an SCL variable in the CALL function?
Perhaps there is a better way (PROC ???) to display an selected image
based on user input?
Any advice appreciated
RandyHerbison@WESTAT.COM (Randy Herbison) wrote in message
news:<916067ABEE7DF34EA4DFE700B1A94A1F71D293@remailnt3-re01.westat.com>...
> Tim,
>
> The macro variable &wat is resolved when the SCL is compiled. To make
> something like this work
>
> rc=imgop(taskid,'READ',"c:\photos\&wat.map.bmp");
>
> use an SCL variable. If you really want to use the macro variable, use
the
> symget function:
>
> rc=imgop(taskid,'READ','c:\photos\' || symget("&wat") || 'map.bmp');
>
>
> RandyHerbison@westat.com
>
>
> -----Original Message-----
> From: Tim Obrey [mailto:tobrey@PREXAR.COM]
> Sent: Thursday, January 30, 2003 2:27 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Calling Image Editor in AF
>
>
> "Richard A. DeVenezia" <radevenz@ix.netcom.com> wrote in message
> news:<vRVZ9.4714$Of.517@tornadotest1.news.pas.earthlink.net>...
> > "Tim Obrey" <tobrey@prexar.com> wrote in message
> > news:a610099a.0301281713.3c0a5e28@posting.google.com...
> > > I have an AF application that I would like to use to display a *.jpg
> > > file using the Image Editor. The user is prompted to enter an ID code
> > > then may push a button to display a map of a lake with the ID code. I
> > > would like to use something like:
> > >
> > > MAP:
> > > call execcmd('image;zoom on;include c:\fish\map.jpg');
> > > return;
> > >
> > > But I do not know the proper code to open a file using the image
> > > editor('include' is not correct). I cannot find any reference to this
> > > in my manuals. Any suggestions?
> > >
> > > Tim
> >
> > The image editor command for opening an external file is
> > IMPORT "<filename>" "format=<image-format>"
> >
> > So you want
> > call execcmd ('image; zoom on; import "c:\fish\map.jpg"
> > "format=JPG";');
> >
> > You might also want to take a look at "Image Viewer Control"
> >
> >
> > Tip: Do you want to know what a menu command did ?
> > Do the menu action (such as File/Open in the Image Editor).
> > Then in the command box enter COMMAND. You will get a little command
line
> > at the top of the active window.
> > Recall prior commands issued to the window by typing ?-enter on the
> command
> > line.
> > Each time you issue the ? command, the next prior command will appear on
> > the command line.
>
> Thanks, that did work. Although I had to use format=JFIF for jpg
> files.
>
> I also was able to use the following:
>
> MAP:
> taskid=imginit(0);
>
> rc=imgop(taskid,'READ','c:\photos\0298map.bmp');
> rc=imgop(taskid,'PASTE');
> rc=imgop(taskid,'PRINT',0,0,99999,99999);/* PRINT */
>
>
> RETURN;
>
> Although I am having difficulty with one related issue. I was hoping
> to be able to resolve an SCL macro variable as part of the path name
> to select which map to display/print. As in the above code, the 0298
> is the id code for a certain water which is entered by the user as
> &WAT. However, I can't seem to get it to resolve correctly using
> either method.