//this currently treats a selective as a workplan and executes all of the
 //executables that exist inside of it instead of just selecting one
 static void decode_selective(AptStepMaker a, Finder f, long exe_id, bool enFlags)
 {
     long size = f.GetSelectiveExecutableCount(exe_id);
     for (long i = 0; i < size; ++i)
     {
         long e_id = f.GetSelectiveExecutableNext(exe_id, i);
         Console.WriteLine("Executable Type from Selective: {0}", f.GetExecutableType(e_id));
         //if we care about whether or not executables are enabled
         //and if the executable has been disabled
         //then skip this executable
         if (enFlags && !a.GetExecutableIsEnabled(e_id))
         {
             Console.WriteLine("Disabled!!");
             //Console.ReadLine();
             continue;
         }
         if (f.IsWorkingstep(e_id))
         {
             decode_workingstep(f, e_id);
         }
         else if (f.IsWorkplan(e_id))
         {
             decode_workplan(a, f, e_id, enFlags);
         }
         else if (f.IsSelective(e_id))
         {
             decode_selective(a, f, e_id, enFlags);
         }
     }
 }
 static void decode_workplan(AptStepMaker a, Finder f, long wp_id, bool enFlags)
 {
     long size = f.GetNestedExecutableCount(wp_id);
     Console.Write("Number of nested executables: ");
     Console.WriteLine(size);
     for (int i = 0; i < size; ++i)
     {
         long exe_id = f.GetNestedExecutableNext(wp_id, i);
         Console.WriteLine("Executable Type: {0}", f.GetExecutableType(exe_id));
         //if we care about whether or not executables are enabled
         //and if the executable has been disabled
         //then skip this executable
         if (enFlags && !a.GetExecutableIsEnabled(exe_id))
         {
             Console.WriteLine("Disabled!!");
             //Console.ReadLine();
             continue;
         }
         if (f.IsWorkingstep(exe_id) && f.GetProcessSpeed(exe_id) != 0)
         {
             //double speed = f.GetProcessSpeed(exe_id);
             //Console.WriteLine("Process Speed: {0}", f.GetProcessSpeed(path_id));
             //Console.WriteLine(speed);
             //Console.ReadLine();
             decode_workingstep(f, exe_id);
         }
         else if (f.IsWorkplan(exe_id))
         {
             decode_workplan(a, f, exe_id, enFlags);
         }
         else if (f.IsSelective(exe_id))
         {
             decode_selective(a, f, exe_id, enFlags);
         }
         //else its an NC Function (unimportant right?)
     }
 }