HOW TO

Remove a table from a project through Avenue

Last Published: April 25, 2020

Summary

Sample code for removing a document from a project using Avenue

Procedure



  1. Open a New Script window.
  2. Copy and paste this code.

    Code:

    '-- Assumes you have a document called View1 in the project
    theView = av.GetProject.FindDoc("View1")
    av.GetProject.RemoveDoc(theView)

    '-- Assumes you have a document called Table1.dbf in the project
    theTable = av.GetProject.FindDoc("Table1.dbf")
    av.GetProject.RemoveDoc(theTable)

    '-- Assumes you have a document called Layout1 in the project
    theLayout = av.GetProject.FindDoc("Layout1")
    av.GetProject.RemoveDoc(theLayout)

  3. Compile the script and run it.

Article ID:000002499

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options