HOW TO

Set extension dependencies for an ODB file

Summary

You can add ArcView extension dependencies to an Object Database (ODB) file using Avenue. This example demonstrates how to add Spatial Analyst as a dependency. Modify the code to work with the extensions of your choice.

Procedure



  1. Start ArcView, if not already running.
  2. Open a new blank script document.

    A. Activate the Project window.
    B. Click the Scripts icon.
    C. Click New.

  3. Copy this code into the new script.
    Code:
    myODB = ODB.Make("c:\temp\myFirst.odb".AsFileName)

    myODB.Add(av.getproject.finddoc("View1").Findtheme("Distance to block.shp"))
    myODB.Add("String 2")
    myODB.Add("String 3")

    theList = myODB.GetDependencies
    theList.add("$avext/spatial.avx".AsFileName)

    myODB.Commit

    msgbox.listasstring(myODB.getDependencies,"","ODB Dependencies")

  4. Compile and run the script.
    Note:
    See the ArcView help topic ODB for addition information.

Article ID:000002459

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic