shrug-l: RefreshCatalog method
Sandell, Keith M.
sandell.keith at mail.dc.state.fl.us
Tue Aug 18 09:28:19 EDT 2009
Hey Shruggers,
Has anybody had any problem with the RefreshCatalog method not working
as expected.
I have a script that creates a user defined table populated with user
define values. I have to verify the output by previewing the output in
Catalog, but for the OverWriteOutput method to work (on the next run)
the containing folder "must" be Refreshed, per ESRI as expected
behavior. So I either manually refresh or I should be able to use the
RefreshCatalog method.
I included the RefreshCatalog method as the first process in the script
and it runs beyond this point, but the script fails prior to
creating/overwriting with a new table saying the "table already exists."
Any thoughts? The important part of the scrip is below:
# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
gp.OverWriteOutput = True
# Load required toolboxes...
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data
Management Tools.tbx")
# Local variables...
scratchWS = gp.scratchWorkspace
xyTableName = "NewUserTable.dbf"
xyTable = scratchWS + "/" + xyTableName
# PreFresh Catalog
gp.RefreshCatalog(scratchWS)
gp.AddMessage("preFresh")
# Process: Create Table...
gp.CreateTable_management(scratchWS, xyTableName, "", "")
Thanks/
Keith Sandell, MBA
Correctional Services Assistant Consultant
Bureau of Probation and Parole Field Services
Office of Community Corrections
Florida Department of Corrections
2601 Blairstone Road
Tallahassee, Florida 32399
Phone: (850) 410-3045
Fax: (850) 487-4427
This electronic message may contain protected health record/care
information intended for addressee(s) only. Unauthorized release or
disclosure may violate state and/or federal laws.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dep.state.fl.us/pipermail/shrug-l/attachments/20090818/4d80e4ef/attachment.htm
More information about the SHRUG-L
mailing list