Custom Mavlink command not visible in mission planner

Hi all,
I have implemented a new mavlink command as described here Adding a new MAVLink Message and compiled Mission Planner after I generated the new mavlink.cs file so it has the same definitions as in SITL in the Ubuntu VM.

I was expecting to see my new command in the dropdown (Plan tab) as shown in the picture below.

I have placed my command in ardupilotmega.xml as

<enum name="MAV_CMD">
 ...
  <entry value="228" name="MAV_CMD_COLLECT_DATA">
    <description>Collect data from ground sensor</description>
    <param index="1" label="AuxiliaryFunction">Auxiliary Function.</param>
    <param index="2" label="SwitchPosition" enum="MAV_CMD_DO_AUX_FUNCTION_SWITCH_LEVEL">Switch Level.</param>
    <param index="3">Empty.</param>
    <param index="4">Empty.</param>
    <param index="5">Empty.</param>
    <param index="6">Empty.</param>
    <param index="7">Empty.</param>
  </entry>  

as I want to implement something similar to waypoint.

How can I get it to display in there?

Thanks in advance,
Greg

Eventually, I found a way. In Mission Planner press Ctrl + F. From the window that appears, click the “Manage Command List” button. Then enter the ID of your command that you want to surface. Also there is a help text there saying

You can add MAVLink commands to the command selection of Planner View’s Mission Grid. To add a command, you have to know the ID. The name will automatically be filled out if the ID is already defined in the MAVLink libraries. You can also add an ID that is not yet defined. In this case, you have to give the name as well. Adding a command here does not mean that the autopilot will accept or execute it. So, you have to know what you are doing.

I can now see my command in that drop down!

Many thanks,
Greg

The trouble now is that the moment I select my command the path lines on the map disappear!
For example… I have this:

image

If I change the first waypoint to my command “Collect_Data” as show here:

Any ideas please?

Does this mean that the drone is going to fly directly to waypoint 2 without visiting waypoint 1 tha has my command?