ArcGIS Server Banner

Toolboxes in geodatabases in PostgreSQL

Toolboxes in geodatabases in PostgreSQL

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
In ArcCatalog, you can create new toolboxes in your geodatabase by right-clicking the geodatabase in the Catalog tree, pointing to New, then clicking Toolbox.

NOTE: Once created, you should add the toolbox to ArcToolbox; if it isn't in ArcToolbox, you can't access it in the command line window. For information on how to create a toolbox or how to add a toolbox, see Basic toolbox management.

If you drag or add your toolbox to ArcToolbox, the toolbox also remains in your geodatabase.

Tooboxes in ArcCatalog

In the Catalog tree, toolboxes appear in an ArcSDE geodatabase for PostgreSQL like the following:

Toolbox in ArcCatalog (PostgreSQL)

Toolboxes in a PostgreSQL DBMS

Only two tables are needed to represent toolboxes in a database: a business table to store information about the tools in the toolbox and a system table—gdb_toolboxes—to keep track of the toolboxes. The following are the tables for the mytools toolbox:

Tables for the MyTools toolbox in PostgreSQL

These two tables are associated by the name—the value in the name field of the gdb_toolboxes table corresponds to the business table name.

The gdb_toolboxes table resides in the ArcSDE administrator's schema, and the business table resides in the user's schema. The gdb_toolboxes table is created when you create the geodatabase; the business table isn't created until you create the toolbox.

For a definition of the gdb_toolboxes table, see System tables of a geodatabase in PostgreSQL.

Following is the definition for a toolbox business table:


Field name Field type Description
objectid integer Unique identifier of the tool

NOT NULL
type smallint Code that indicates the type of tool

1 = function tool

2 = model tool

3 = script tool

4 = custom tool

NOT NULL
name varchar(255) Name of the tool

NOT NULL
displayname varchar(255) The label for the tool
description varchar(255) Description of the tool
category varchar(255) Name of the toolset in which tools are grouped including the path to the toolset if it is a toolset nested inside another toolset
tool bytea All other properties of the tool

Toolboxes in an XML workspace document

Toolboxes are data elements and, therefore, are prefaced with a DataElement tag. The data element type is esri.DEToolbox.

The following is the XML (including metadata) for the toolbox MyTools:

<DataElement xsi:type="esri:DEToolbox">
  <CatalogPath>/V=sde.DEFAULT/TB=posty.emily.mytools</CatalogPath> 
  <Name>db.sch.mytools</Name> 
  <MetadataRetrieved>true</MetadataRetrieved>
 <Metadata xsi:type="esri:XmlPropertySet">
  <XmlDoc><?xml version="1.0"?> <metadata xml:lang="en"><Esri><MetaID>{AE214421-4877-4FEB-96A5-8668EBAA9326}</MetaID><CreaDate>20060426</CreaDate><CreaTime>11473700</CreaTime><SyncOnce>TRUE</SyncOnce><ModDate>20060426</ModDate><ModTime>114737</ModTime></Esri><toolbox name="bu_42606.DBO.MoveData" alias=""><arcToolboxHelpPath>C:\Program Files\ArcGIS\Help\gp</arcToolboxHelpPath><toolsets/></toolbox><dataIdInfo><idCitation><resTitle>bu_42606.DBO.MoveData</resTitle></idCitation></dataIdInfo><distInfo><distributor><distorFormat><formatName>ArcToolbox Toolbox</formatName></distorFormat></distributor></distInfo></metadata></XmlDoc> 
  </Metadata>
  <DatasetType>esriDTToolbox</DatasetType> 
  <DSID>-1</DSID> 
  <Versioned>false</Versioned> 
  <CanVersion>false</CanVersion> 
</DataElement>