Select to view content in your preferred language

Auto DBF output help!

910
11
02-20-2014 09:11 AM
DannyLackey
Deactivated User
I'm not understanding how to use the script located here:
http://resources.arcgis.com/en/help/main/10.1/index.html#//00120000001t000000

I've used other python scripts such as auto pdf output script with no problem.  Here is how I'm attempting to use this:

import arcpy
from arcpy import env
 
env.workspace = "c:/Test"
 
inTables = ["AJD_rate"]
outLocation = "c:/Test"


try: 
    # Execute TableToDBASE
    arcpy.TableToDBASE_conversion(inTables, outLocation)
except:
    print arcpy.GetMessages()


The table I want to output to DBF is inside a .mxd file, but this script doesn't seem to require an input file, only a directory.  The table name is "AJD_rate".  Where am I going wrong? 

TIA
Tags (2)
0 Kudos
11 Replies
JamesCrandall
MVP Frequent Contributor
The table I want to output to DBF is inside a .mxd file, but this script doesn't seem to require an input file, only a directory.  The table name is "AJD_rate".  Where am I going wrong? 

TIA


The example shows you how to convert a list of GDB tables ("inTables").  They are setting the workspace then just specifying the names of the tables inside of that geodatabase ("workspace") to output .dbf files to that output folder.

The question is, what is your input table?  Saying "the table in a .mxd file" is not enough.  What is it?  Where is it?  etc...
0 Kudos
DannyLackey
Deactivated User
This is all in an effort to "workaround" the lack of .dbf output in MS Access since their 2013 version.  I noticed that ArcGIS has the ability to output a DBF, so my idea was to have access output a table, have that table linked in ArcGIS, create a script to have ArcGIS dump this table to DBF via python, then link that dbf back to ArcGIS. 

Apparently .dbf's don't lock (desirable for multiple users) and allows additional data to be visible within the map.  This table contains x,y data, and some additional data.  So, that's where it comes from and that's what's in it.  This would be a .py file I could call from Windows Task Scheduler.
0 Kudos
JamesCrandall
MVP Frequent Contributor
Okay, but what is the input table that you dropped into ArcMap and you want to convert to a .dbf file?
0 Kudos
DannyLackey
Deactivated User
Its a table linked from an access database (.mdb)
0 Kudos
JamesCrandall
MVP Frequent Contributor
I am not able to set a workspace to an .mdb in my quick testing.
0 Kudos
DannyLackey
Deactivated User
Can you set it to an .xlsx workbook?  That would be ideal.
0 Kudos
MichaelVolz
Esteemed Contributor
What version of ArcMap are you working with?

What type of operating system are you (32-bit or 64-bit)?
0 Kudos
DannyLackey
Deactivated User
What version of ArcMap are you working with?

What type of operating system are you (32-bit or 64-bit)?


10.1 & 64bit
0 Kudos
MichaelVolz
Esteemed Contributor
Make sure you are working with 32-bit python as 64-bit python will not work with personal geodatabases (Access).  No sure if this will matter, but make sure you have Background Geoprocessing disabled as that is running in 64-bit mode.
0 Kudos