X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



9646 Rate this article:
No rating

Tips on Importing pre-7.0 IDL Projects into the IDL 7.0 Workbench

Topic
With the IDL Development Environment's ('idlde') migration to the Eclipse framework, the concept of "IDL Projects" has changed quite radically. The "IDL Projects" of the old Development Environment (DE) are a proprietary convention, developed in-house many years ago, and specific to the needs of pure '.pro' coding. They were not developed with an eye to matching the conventions of software development projects as defined in the development environments of other languages. The migration of the 'idlde' to Eclipse has offered IDL an opportunity to align its handling of projects with the norms of the most popular programming development environments (Visual Studio, Sun Java NetBeans, the Eclipse JDE, etc.)

As a result of this redefinition of the meaning and behavior of IDL Projects, the new Workbench can not import old DE Project files ('.prj' files). The good news is that porting old IDL applications, even very large ones, to the new IDL 7.0 Workbench can usually be done in just a few mouse and keyboard steps within a minute or two. This Help Artcile provides the steps that will accomplish this, and may be useful both to readers, who want to port old projects to the new Workbench, as well as to readers, who want good tips on how to organize newly created Projects.

Discussion
The topics below relate directly to issues surrounding importing pre-7.0 IDL application projects into the new IDL 7.0 Workbench environment. Take a look at the bold-face topic headings to see which relate most to your current issues. For tips on creating new IDL Projects from scratch, see Help Article #4308 ("Tips on Creating New IDL Projects in the IDL 7.0 Workbench")

IMPORTING WHEN THE APPLICATION FILES ARE ALL
LOCATED IN ONE APPLICATION ROOT DIRECTORY

Ideally, this should be the situation for most existing IDL Projects. Although the old DE did not require that all source code, resource and data files all be in one single directory tree, it was always good programming practise to follow that principal. If that is the case with your IDL projects, below are the simple steps that will complete the import from earlier IDL to version 7.0. (Note: In this example, we use a slightly unrealistic scenario - making a Project out of IDL's 'demo' program. This serves no useful real-life purpose ... unless you are wanting to modify IDL's DEMO program. Use one of your own application directories instead of '...idl70/examples/demo/', if you have one. To use 'demo' your login must have Write permissions in the IDL 7.0 'demo' directory.)

Step 1: Select 'File -> New -> IDL Project' from the IDL 7.0 Workbench menu.

Step 2: In the ensuing 'New IDL Project' dialog:

  • Enter the name of the project. In our example we enter "demo" as the Project Name.

  • Click on the 'Create the new project from an existing directory' radio button and use the 'Browse...' button to find the application root directory on your file system. For 'demo' the application root directory is the '.../examples/demo/' subdirectory in your IDL70 directory tree.

  • Is your application root directory already in your IDL Search Path? If yes, uncheck the checkbox option 'Update IDL path preference when project is opened or closed.' If no, check this option. It is a nice option in the new IDL Workbench that the code in a project can optionally be kept out of the IDL Search Path, when that project is not being worked on.

Step 3: Hit 'Finish' in the 'New IDL Project' and notice in your Workbench's Project Explorer view how the window populated with a new project tree.

Step 4: The settings of the 'Project ->Options...' dialog of 'idlde' versions past has been replaced by one page of the Project Properties dialog in IDL 7.0, Right-click on the project folder in the Project Explorer View, select 'Properties' from the context menu and select the 'IDL Project Properties' page. The options there should be familiar to you from earlier IDL, and can be set to match the previous version's. That's it; your import is done!

Let's talk a little bit about what executed in the background during the above two steps.

  1. The location of the files in your file system was left unchanged. Nothing was copied or moved. Your old IDL DE's will be able to open your project as always. Absolute and relative paths to data and resource files in your directory tree are preserved and will automatically work in your IDL 7.0 compiled program the way they did in earlier 'idlde' builds.

  2. One new file is inserted in your application root directory. It is always named ".project", is XML format, and takes up less than 1 kb of space on your hard drive.This one short configuration file is all that is needed to reveal the entire contents of the application root directory tree in the Eclipse Project Explorer View.

  3. The 'Project -> Build Project' menu option will now find every '.pro' file in your application tree when it is building your '.sav' program.

IMPORTING WHEN A SPECIAL BUILD ORDER IS REQUIRED

One functionality not implemented in the Eclipse-based Workbench is a View or Wizard that is equivalent to the Project window's 'Build Order' tab page of 'idlde' versions past. Many programs do not need a special build order. If your legacy IDL Projects never used that 'Build Order' tab page, then this subject is probably not so important for you. Those who have used the 'Build Order' tab page in the past, or those who have encountered "Cannot open" or "Cannot find" errors during a 'Project -> Build Project' execution, should read Help Article #4306 ("Using the Build Order of Old IDL Projects in the New IDL 7.0 Workbench").

IMPORTING WHEN THE APPLICATION FILES ARE LOCATED IN DIFFERENT
DIRECTORY TREES THAT DO NOT SHARE ONE COMMON APPLICATION ROOT

Eclipse Workbench Projects strictly enforce a good programming practice - requiring "custom files" that belong specifically to a project program to be physically located on the file system in the application directory tree (or have an explicit link in that tree) . Old IDL Projects did not have this requirement. Consequently, when you perform Step 2 above there are '.pro's in your old IDL DE Project window that might not be duplicated in the new IDL Workbench Project Explorer view window. Here are the alternative methods you have to complete the project import to IDL 7.0:

METHOD 1: Would the missing '.pro's ever be modified within the scope of the current project? If no, be glad that they are no longer listed as a direct part of the current project. They should either have their own Project root, or, if they are never to be modified by you or your team, they should be treated as "library" files, which only need to be located in your persistent IDL Search Path, but do not have to be part of a project. (Details on organizing 'library' files is a subtopic in separate Help Article #4308).

METHOD 2: If the missing '.pro's do contain code that you might modify within the scope of the current project, then you have two choices:

  1. If the '.pro's are only used in the current project, use your file system explorer to move them into your application root directory. Do not use the IDL Workbench Project Explorer for this move. Its 'Import...' functionality can only copy files into your project root directory and it will leave redundant copies behind. After you have completed the copy, hit the Workbench menu option 'File -> Refresh', and the Project Explorer view will update to show the new file(s) that have been moved into the project root directory.

  2. Make a separate Project(s) out of the root directory for the stray '.pro'(s) using the steps described in 'IMPORTING WHEN THE APPLICATION FILES ARE ALL LOCATED IN ONE APPLICATION ROOT DIRECTORY' above. You can then include that new project as a "subproject" (or dependency) of your main Project by right-clicking on your main project folder in the Project Explorer view, selecting 'Properties' from the context menu, selecting the 'Project References' tab page, and selecting in its listbox the project(s) that you want to associate with your current program, as shown below:

    tt4307_project_properties.png

  3. Build order can certainly be an issue when you have multiple IDL Workbench Projects producing one '.sav' program, but, once again, the methodology demonstrated in Help Article #4306 ("Using the Build Order of Old IDL Projects in the New IDL 7.0 Workbench") can set your new Workbench Project up for rapid deployment.

CAN I EASILY MOVE MY CURRENT PROJECT DIRECTORIES INTO THE 'IDLWorkspace'?

Yes, certainly! Here's how easy it is to import a pre-7.0 IDL application project into IDL 7.0, if you are willing to move the application root directory on your file system:

Step 1: Using your O.S.'s file system explorer (or "mv"/"rename" commands at a shell prompt), move the application root directory from its current location into the 'IDLWorkspace' folder.

Step 2: Select 'File -> New -> IDL Project' in the IDL Workbench menu and enter the name of the folder you just moved. That is all. Leave the 'Location' setting at its default setting 'Create the new project in the workspace'. This setting will not erase or overwrite any files in the project directory. When you hit the 'Finish' button, the project folder and all its files will be immediately visible in your IDL Workbench.

That's it. You're done!

***Note on cleaning up*** If you used IDL's 'demo' app in experimentation as offered in the beginning of this Tech Tip, you can delete that project now by right-clicking on the 'demo' folder in your Project Explorer view and selecting 'Delete' from the context menu. In the ensuing 'Confirm Project Delete' dialog, take care that the radio button 'Do not delete contents' is selected before you hit the 'Yes' button. Go in afterwards to the '.../examples/demo/' folder in your IDL installation and delete the '.project' file there.

Questions or comments? Please share these with 'support@exelisvis.com', naming the Help Article number in the Subject and/or Body of your Email.

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »