Hi Herbert,
Assuming your j804/5 jqt is already working, and you know how to
boot up a J working environment via OLECOM. A working environment
means boot.ijs and base library are loaded, and all
SystemFolders have been set up. You need not access jqt.dll
directly, the qt addons will do it for you. Put the script at
the bottom in to a file eg. somepath/plotc.ijs
It is the same script in qt demo, but with an additional
option visible 0 to suppress calling browser to display the png.
The pixel size is controlled by last qtc output command.
The default name for the output file is plot.png under
~temp folder, ie jpath'~temp/plot.png'
I'm not so sure the c# syntax, but it should be something
like jdo("load 'somepath/plotc.ijs'")
and then you can display the png inside a c# image widget.
You can use jexeserver for development and debug, it is easier
to see what is going on a Jqt session Term and you can switch
to jdllserver for production. Switch by replacing the progid
"jdllserver" with "jexeserver" or vice versa in the c# side,
the J side remains unchanged.
eg, when using jexeserver, after running c# jdo command, you
can type on J session term
viewimage_j_ jpath'~temp/plot.png'
to display the png and confirm success.
NB.===============================
coclass 'qtdemo'
run_plotc=: 3 : 0
require'~addons/ide/qt/qt.ijs'
require'~addons/ide/qt/console.ijs'
require 'plot math/misc/trig'
if. glc_free_jglc_ ::1: '' do.
smoutput 'This demo is not supported on ', UNAME, ' ', wd 'version'
return.
end.
steps=: {. + (1&{ - {.) * (i.@>: % ])@{:
pd 'reset'
pd 'title sin(exp) vs cos(exp)'
pd 'color red,green'
pd 'key sin(exp),cos(exp)'
x=. steps _1 2 100
pd x;sin ^x
pd x;cos ^x
pd 'visible 0'
pd 'qtc 400 400'
)
run_plotc''
Ср, 19 окт 2016, Herbert Weissenbaeck // Privat написал(а):
> Thank you, Eric.
> Had a look at 805, new JHS and d3. Impressive, but not 100% relevant.
> What I am looking for is a way of access to the plot outputs (PDF, PNG or
> whatever format) via COM in a fashion similar to what is described in the
> (great) .NET interop guide by Oleg Kobchenko.
>
> (Regarding Bill's hint: How would I be able to access JQT (dll) from .net?
> And how would I use it to access the J plot outputs?)
>
> -----Original Message-----
> From: Programming [mailto:[email protected]] On Behalf
> Of Eric Iverson
> Sent: Mittwoch, 19. Oktober 2016 15:34
> To: Programming forum <[email protected]>
> Subject: Re: [Jprogramming] Access of Plot Output via JDLLServer COM Interface
>
> jd3 refers to the use of d3 (javascript plots done from data in the
> browser) in the JHS (browser) front end. This is probably not relevant to
> your interest in C# and COM access to J.
>
> As Bill pointed out you probably want to work with jqt or other options.
>
> The 805 beta release is now quite stable and will be in official releas by
> year end. This year has been a very busy one for us and 805 is a big step
> forward. Unless you are running critical production systems, I would strongly
> suggest that you move now to the latest 805 beta and use that as your J base.
>
> Hopefully other forum members can respond more directly to you C#/COM/Plot
> interests.
>
> On Wed, Oct 19, 2016 at 6:47 AM, Herbert Weissenbaeck // Privat <
> [email protected]> wrote:
>
> > How would I access the graphical output of the J plot command when
> > accessing J via the COM (DLL) interface from C#?
> >
> > (There must be a more elegant way than saving it to a pdf and loading
> > it into the c# app.)
> >
> > Thank you.
> >
> > Herbert
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm