Main Page Basics, Building SPICE Applications (IDL)
## Table of Contents
       Basics, Building SPICE Applications (IDL)
          Note About HTML Links
          Environment Set-up
             Unix/Linux
             Windows
             Confirm IDL can access Icy:
          A simple example program
Top # Basics, Building SPICE Applications (IDL) March 01, 2023 Top ## Note About HTML Links The HTML version of this lesson contains links pointing to various HTML documents provided with the Toolkit. All of these links are relative and, in order to function, require this document to be in a certain location in the Toolkit HTML documentation directory tree. In order for the links to be resolved, if not done already by installing the lessons package under the Toolkit's ``doc/html'' directory, create a subdirectory called ``lessons'' under the ``doc/html'' directory of the ``icy/'' tree and copy this document to that subdirectory before loading it into a Web browser. Top ## Environment Set-up Use of Icy from IDL requires the Icy DLM exists in the IDL search path. IDL provides a programmatic command to register a DLM (add the path), "dlm_register." Top ### Unix/Linux Assume Icy is installed at /naif/icy/. The corresponding path to the Icy DLM being /naif/icy/lib/icy.dlm. Register Icy DLM via IDL prompt.
       IDL> dlm_register, '/naif/icy/lib/icy.dlm'
Top ### Windows Assume Icy is installed at c:\naif\icy\. The corresponding path to the Icy DLM being c:\naif\icy\lib\icy.dlm. Register Icy DLM via IDL prompt.
       IDL> dlm_register, 'c:\naif\icy\lib\icy.dlm'
Top ### Confirm IDL can access Icy:
       IDL> help, 'icy', /dlm
A proper response shows a path to the Icy interface library and some version information, similar to:
       ** ICY - IDL/CSPICE interface from JPL/NAIF (not loaded)
       Version: 1.9.0, Build Date: 05-NOV-2021,
       Source: Marc.Costa.Sitja@jpl.nasa.gov
       Path: /naif/icy/lib/icy.so
The response
       % Unknown dynamically loadable module: icy.
indicates the IDL search path does not include the Icy ``icy.dlm'' file. Top ## A simple example program This procedure calls the Icy function 'cspice_tkvrsn' then outputs the return value. File tk_ver.pro:
       PRO tk_ver

          print, 'Toolkit version : ', cspice_tkvrsn('TOOLKIT')

       END
From IDL, compile then execute the procedure:
       IDL> .comp tk_ver.pro
       % Compiled module: TK_VER.

       IDL> tk_ver
       % Loaded DLM: ICY.
       Toolkit version : CSPICE_N0067