"Hello, World!" Program


The Visual Programming Environment or VPE is way programs (sometimes called networks) are written in OpenDX.   On the left-hand side of the VPE you see a list of modules with a + sign next to them.  Selecting a + expands that category of modules.  CISM-DX includes several specialized space physics modules we created to extend the capabilities of OpenDX, e.g. coordinate transformations and magnetic field models, these categories begin with CISM_DX_.

To "write" your first program in the VPE, expand the ALL category on the left and scroll down and select the "Text" module with a left-click. Release the mouse button and move the pointer over the canvas. Your pointer should have turned from an arrow into a half-square. Now left click and you should see a green box appear. Each green box can be thought of as a subroutine that completes a step in process of producing a final image (or other form of output).

Double click on the green Text module box, replace the text (none) "Hello World" (with double quotes). For the font value, you should see "variable". If you want to change the font type, click on the box with "...". Also notice the tabs on the bottom such as "Description" and "Help on Syntax". You may need these to get more detail about the inputs, outputs, and what the module does. The "Expand" button is used in some modules that have many input options. Selecting "Expand" in such modules will list hidden options. The hidden options "direction" and "up" are used to change the orientation of text in an image. After you have explored the buttons click OK.

The OpenDX Executive reads the code and decides if it needs to do anything. So far, our network produces no output, so executing the network yields no result and OpenDX does nothing but scan the network to see if it should do anything.

To complete the program, put an "Image" module below the green "Text" module and then connect the bottom (output) tab of the "Text" module to the  top (input) tab of the "Image" module.  Execute the program typing CTRL+E or Execute-Execute Once from the top menu bar.  An Image window will appear with the text "Hello, World" centered in the display.

Things to try