After the discussion a few days ago, I resurrected my native-Windows DX
executive and ActiveDX component, and prepared a demo. You can download it
from http://opendx.watson.ibm.com/ActiveDX - its adx-demo.tar.gz.
To "install" it, unzip and untar it. Put the (wherever)/adx-demo/bin
directory in your path, and type:
regsvr32 (wherever)/adx-demo/bin/ActiveDX.ocx
You should get a message that the registration succeeded. When you are
done with it, type:
regsvr32 /u (wherever)/bin/ActiveDX.ocx
to unregister it, and then remove the bin dir from your path.
Two demos are included in separate subdirs: Example1 and Example2. Each is
in there as an executable .exe and as a VB project, and there are one or
more .net files in each. All but Imp.net are edittable by vanilla OpenDX;
Imp.net is a trivial little script.
CD into Example1 and run Example.exe. A window pops up. Hit the OpenDX
Dialog... button and up will come a window containing a messages window.
There's a typein to enter script commands; enter
Echo("foo")
(no semicolon) and you'll see the response.
Now back in the original window, there are three typeins. The first tells
it where to find the net that customizes the control; modify it to reflect
where you untarred the demo and then press the send button to cause it to
load the net file. Press the send button for the template; this is the
template for the macro call that invokes the OpenDX functionality. It will
automatically substitute the necessary Window handle and size for HWND and
SIZE; you then use the parameter typein and send button to specify new
values for the 'i' parameter - the isovalue. This is the general interface
to ActiveDX controls: you use the setparam property of the ActiveDX control
to specify name/value pairs; these are substituted into the template and
the resulting parameterized macro invokation is executed in OpenDX.
CD into Example2 and run Example.exe. Again, a window pops up. Press the
OpenDX... button to open the messages window, and Properties... to open the
properties window. Here you'll see four typeins. The first specifies the
directory to find the net files; modify it to reflect where you untarred
the demo. The other three specify templates for three ActiveDX components
- one of which is essentially invisible and used just to import data, and
the other two are two separate visualizations of the same data. Hit OK to
load the properties.
Now back in the main window hit Browse... to open a File Selector, and
select test.dx ; hit OK. Up will come two images of bounding boxes. The
slider under the left image specifies isovalues; the one under the other a
slicing plane (initially edge-on - rotate to see it). When you move a
slider, the corresponding image updates. You can also change the slicing
axis on the right viz.
There are lots of problems with this; not the least is that it doesn't exit
correctly; you may have to use the Task Manager to truly kill the demos.
It also only uses OpenGL rendering; the software renderer has bugs. Lots
more. But I think it demonstrates the possibilities.
If there is enough interest that people would like to help fold this into
OpenDX (its based on a very old snapshot of the OpenDX code and involves a
*lot* of changes) I can make the source available under the same licensing
agreement as OpenDX.
Greg