longs

MakeTableView_management causes an exception when outside of ArcMap

Discussion created by longs on Jun 4, 2012
Latest reply on Jun 5, 2012 by longs
Hello,
I'm trying to script the process of creating a replica in a stand alone python script. The geodatabase I'm creating the replica for, (CHECK_OUT type), includes business table I that want in the file geodatabase. If I execute the following line of code in ArcMap in the python window it works well and ArcMap adds the view to the current map. And, it persists from session to session.

arcpy.MakeTableView_management("VegetationMgmt.owner.Actions", "Actions", "AID > 0")

However, when I execute it in a stand alone script after setting up the workspace:
env.workspace = "...\SpatialVegMgmt_NT38.sde"

it produces an error of VegetationMgmt.owner.Actions already exists.

Can anyone help on why it works inside ArcMap but not outside?

Steve

Outcomes