English

How To: Remove a table from a project through Avenue

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.