Previous Next        Current Page: NeXtMidas Training / Primitives / Lab 5* / Instructions
back
+ Start Here   
+ Background   
+ Common Midas Concepts   
+ Getting Started - Part 1   
+ Getting Started - Part 2   
+ Working with Files   
+ Option Trees   
+ Macros - Part 1 (Basics)   
+ Macros - Part 2 (Graphics)   
+ NetBeans - Part 1 (Setup)   
+ NetBeans - Part 2 (GUIs)   
+ NetBeans - Part 3 (Profiler)   
+ Eclipse - Part 1 (Setup)   
+ Eclipse - Part 2 (GUIs)   
- Primitives   
   + Overview   
   + Open, Process, Close   
   + Building   
   + The NeXtMidas API   
   + Lab 1   
   + Special Variables   
   + Lab 2   
   + Lab 3*   
   + Files in a Primitive   
   + Lab 4   
   - Lab 5*   
      - Instructions   
      - Solution   
   + Test Macros   
   + Lab 6   
   + Real Time Controls   
   + Lab 7   
   + Working with Messages   
   + Lab 8   
   + Primitive Restarts   
   + Introduction to DSP   
   + Lab 9   
   - Commands executing commands   
+ WebStart   
+ Maps & Imagery   
+ X-Midas Interoperability   
+ RMIF & Remoting   
+ Installing NeXtMidas   
+ Support & Maintenance   
+ File Handlers   


  • Lab 5:
    • Write a primitive that will take in a Midas Blue file (a DataFile) and convert it to a CSV file.
      nM> primlab5 <IN> <OUT>
      nM> primlab5 testxy3000.prm testxy.csv{COLUMNNAMES="ABSC|ORD"}
    • Tips:
      • Do not try to write the entire CSV file by hand using TextFile.
      • DataFile implements the ListFile interface.
      • CsvFile implements the ListFile interface.
      • All the methods you need can be found in the ListFile interface.
    • Be sure to test your primitive on many different files.
    • How hard would it be to make your primitive work with any type of ListFile as either input or output?

back