laptop and a wrench

漏洞

Custom import/export tool created with the Data Interoperability extension runs sucessfully from Python, but when added in as a script tool in ArcToolbox, it fails because it does not recognize the Spatial ETL tool.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM006088
已提交January 16, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
修正版本9.3
状态Fixed

解决办法

The only workaround I have seen at this point is with Pythons spawnv method.# Main scriptimport arcgisscripting, os, sysgp = arcgisscripting.create()#you will need to set the correct path information to python.exe on your machinepythonPath = '<a href="file:C://Python24//python.exe'" target="_blank">C:\\Python24\\python.exe'</a>#Reference to the second scriptETL = '<a href="file:C://Incidents//Active//540203//SpawnTest//ETL_Tool.py'" target="_blank">C:\\Incidents\\Active\\540203\\SpawnTest\\ETL_Tool.py'</a># just an example of passing messages between the two scriptsname = sys.argv[1]#create a list for the parameters for the second script parameterList = []parameterList.append('python.exe')parameterList.append(ETL)parameterList.append(name)#run the second script in a new instance of python and populate the scripts parameters with the appropriate values os.spawnv(os.P_WAIT, pythonPath, parameterList)print "End of script"del gp#########################################script called from spawnvimport os, sys, arcgisscripting# Create the geoprocessor object.# The memory used by this process will clear as soon as the process is completedgp = arcgisscripting.create()#Gets the values from the first scriptname = sys.argv[1]print "Got the correct name: " + name# Load required toolboxes...gp.AddToolbox("C:/Documents and Settings/john4818/Application Data/ESRI/ArcToolbox/My Toolboxes/ETL.tbx")#gp.setproduct("ArcView")#gp.setproduct("ArcEditor")# Local variables...test3_dwg = "<a href="file:C://Incidents//Active//540203//test22.dwg" target="_blank">C:\\Incidents\\Active\\540203\\test22.dwg</a>"New_Personal_Geodatabase_mdb = "<a href="file:C://Incidents//Active//540203//New" target="_blank">C:\\Incidents\\Active\\540203\\New</a> Personal Geodatabase.mdb"gp.Toolbox = "C:/Documents and Settings/john4818/Application Data/ESRI/ArcToolbox/My Toolboxes/ETL.tbx"# Process: Spatial ETL Tool...gp.SpatialETLTool("'<a href="file:C://Incidents//Active//540203//New" target="_blank">C:\\Incidents\\Active\\540203\\New</a> Personal Geodatabase.mdb'", test3_dwg)del gp

重现步骤

漏洞 ID: NIM006088

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项