Shape.Area throws an error in CalculateField tool when run on a shapefile using VB syntax.
上次发布: August 25, 2014ArcGIS for Desktop
漏洞 ID 编号
NIM045219
已提交
May 8, 2009
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
9.3
操作系统
Windows OS
操作系统版本
XP
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
Public Sub CalcFields()Dim pGP As ObjectSet pGP = CreateObject("esriGeoprocessing.GPDispatch.1")On Error GoTo eh'Location of the toolboxpGP.AddToolbox ("C:\Documents and Settings\<profile_name>\Application Data\ESRI\ArcToolbox\My Toolboxes\TEST.tbx")'Name of the script (Calcualte Fields)pGP.Script1 MsgBox pGP.GetMessages(), vbOKOnly, "Test" eh: Debug.Print Err.Number & " " & Err.DescriptionEnd SubThere is few more ways of running geoprocessing functionality using VBA, check out this articlehttp://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=31110