Problem:  A script tool using arcpy.TestSchemaLock does not return the correct value when the tool is run in 64-bit background geoprocessing

相关信息
Article ID: 40911
Bug Id: N/A
Software:
ArcGIS for Desktop Advanced 10.1
ArcGIS for Desktop Standard 10.1
ArcGIS for Desktop Basic 10.1
Platforms:
Windows XP, Vista, Server 2008, Windows 7, Windows 8, Server 2012

问题描述
TestSchemaLock returns True (1) when the actual value is False (0) when the script tool is run from 64-bit background geoprocessing.

原因
This is a known limitation. The 64-bit background processing cannot gather the schema lock information across applications running as 32-bit. Therefore, script tools using TestSchemaLock run in 64-bit background geoprocessing are unable to check/test the data for locks in ArcMap/ArcCatalog and other 32-bit applications. Thus, any use of TestSchemaLock in this scenario appears as if the data is not locked.

However, if attempting to do something like modify data being edited (say by append or an updatecursor), this is prevented due to higher framework checks performed by ArcGIS itself to make sure the data can be used. ArcGIS is still able to prevent the use of data that is locked. Just the TestSchemaLock function in scripts run from 64-bit background geoprocessing cannot report that this lock information is present on the data that is used across the different bit versions.
已邀请:

易智瑞技术支持

赞同来自:

解决方案
In the script tool properties dialog, select 'Always run in foreground'.

Related Information
  1. Desktop 10.1 help: TestSchemaLock (arcpy)



原文链接
http://support.esri.com/en/kno ... 40911

要回复问题请先登录注册