Select to view content in your preferred language

How to nest IDL code into Python script for use as a tool in ArcGIS ModelBuilder

784
2
02-03-2013 05:53 PM
mattijnvan_hoek
Emerging Contributor
I have developed some code in IDL using ENVI and now I would like to use this code as a tool in my model in ArcGIS ModelBuilder.

My first thought is that I need to develop some kind of script in Python which can pipe input to my IDL code and can receive the output from my IDL code. This Python script has then to be converted into an ArcGIS ModelBuilder tool.

But I???ve no experience in doing this. Is there anybody who can give me some guidance, pointers or links to useful examples/tutorials?

Thanks
0 Kudos
2 Replies
DaleHoneycutt
Deactivated User
Start with the Quick Tour of developing tools in Python.  This help topic is the overview topic that explains how to create a script tool that you can use in ModelBuilder.

As far as the Python code itself, you want to execute your IDL code from w/in Python, reading and writing to standard input/output or to files.  I don't have any experience with IDL so I don't know what it's capable of.  And I kinda forget the Python calls for executing external programs (did it many years ago), but there's lots of examples on the web; just do a search -- I found some threads on stackoverflow.com

You should visit our Python resource center, as well as our Python recipe site. There is also a Python forum.
0 Kudos
mattijnvan_hoek
Emerging Contributor
Thanks for sharing your information. It is exactly what I need. Really helpfull.

Thanks again.
0 Kudos