When a locator is copied to SDE, user should be given an opportunity to select destination Config Keyword.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM004383
已提交
September 26, 2006
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.
解决办法
Use the following VBA script to change the config keyword of the locator.Private Sub CopyLocator() CopyLocatorToSDEWorkspace "<a href="file:c:/MyLocators" target="_blank">c:\MyLocators</a>", "MyLocator1", "myconn.sde", "MyKeyword"End SubPrivate Sub CopyLocatorToSDEWorkspace(localWksDir As String, locatorName As String, sdeConnFile As String, configKeyword as String) Dim locMgr As ILocatorManager2 Set locMgr = New LocatorManager ' get the full name of the ArcSDE connection file Dim fullConnFileName As String fullConnFileName = Environ("USERPROFILE") + "\Application Data\ESRI\ArcCatalog\" + sdeConnFile ' open ArcSde connection Dim sdeLocWks As ILocatorWorkspace Set sdeLocWks = locMgr.GetLocatorWorkspaceFromPath(fullConnFileName) ' get locator from a local folder Dim localLocWks As ILocatorWorkspace Set localLocWks = locMgr.GetLocatorWorkspaceFromPath(localWksDir) Dim loc As ILocator Set loc = localLocWks.GetLocator(locatorName) ' copy the locator to ArcSDE workspace sdeLocWks.AddLocator locatorName, loc, configKeyword, NothingEnd Sub