Interacting with the Utility Network toolbar crashes the ArcMap application if a custom or an existing command is programmatically added to the toolbar.
上次发布: August 25, 2014ArcGIS for Desktop
漏洞 ID 编号
NIM047024
已提交
July 23, 2009
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
9.3.1
编程语言
C#
操作系统
Windows OS
操作系统版本
XP
修正版本
10.0
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
A workaround to this problem is to ensuring in the code that the Utility Network Analysis Extension is started before finding the toolbar and adding the command.Here is the code that will do this: void OnInitialized() { this.m_UtilityNetworkToolbarUID = (m_application as IObjectFactory).Create("esriSystem.UID") as UID; this.m_UtilityNetworkToolbarUID.Value = "esriEditorExt.UtilityNetworkToolBar"; this.m_UtilityDetermineClientsAndValvesUID = (m_application as IObjectFactory).Create("esriSystem.UID") as UID; this.m_UtilityDetermineClientsAndValvesUID.Value ="{8603563F-D907-4271-BDC2-9160C6FDA123}"; UID extUID = new UIDClass(); extUID.Value = "esriEditorExt.UtilityNetworkAnalysisExt"; object obj = new object(); IExtensionManagerAdmin pExtAdmin = new ExtensionManagerClass(); pExtAdmin.AddExtension(extUID, ref obj); CheckMenuValidity(); }