For this lab you will see how to receive messages in a macro.
Create a new macro msglab1 in the TRAIN option tree.
In this lab we will be getting messages from a PLOT. In order
for the PLOT to stay up and allow the macro to receive messages,
it needs to be in a pipe section.
In the body of your macro add a pipe section.
The first line of the pipe section should look like this:
pipe on
panel
This will bring up a PANEL. The use of PANEL will
be discussed in the next section. For now all that is important is that
clicking the 'X' in the panel will end the macro. (When the PANEL
comes up it will probably be behind the PLOT, so you may need to
move the PLOT to see it.)
In the pipe section, bring up a PLOT of
nxm.sys.dat.world.shp
Give the plot an ID of MYPLOT and set the /MSGID=...
switch.
Part B will cover the details of processMessage procedure. For now
just make it print out the message received.
The feature will be located at fea1.x and fea1.y In the
processMessage procedure, set the location of the feature to match
the "MARK" message received.
In the processMessage add a check for a "MARK" message.
When you see a "MARK" message set the feature location to match
that given in the "MARK" message.
Hint: If your data is a "PosLonLatAlt" you can
access data.lon, data.lat and data.alt.
Now try running your macro and clicking around the map. You should see a yellow 'X'
marking the last place you clicked.