Need interface to access the new paste dialog box, which is available in ArcGIS 10.
上次发布: August 19, 2020ArcGIS for Desktop
漏洞 ID 编号
NIM064998
已提交
February 11, 2011
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
10.0
操作系统
Windows OS
操作系统版本
XP
状态
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 UID object to access to the existing paste dialog. This approach does not really use ArcObject to create a Paste dialog, but call the existing paste tool from the tool bar. Using following code we can get the name of feature layer in which the features are copied while editing.Public Sub CopyPaste ()Dim pEditor As IEditorDim pID As New UIDDim bInOperation As Boolean'On Error GoTo ErrorHandler'Get a reference to the editor extensionpID = "esriEditor.Editor"Set pEditor = Application.FindExtensionByCLSID(pID)'Create an edit operation enabling undo for the operationpEditor.StartOperationbInOperation = True'Make sure something has been selectedIf pEditor.SelectionCount = 0 Then Exit SubApplication.Document.CommandBars.Find(arcid.Edit_Copy).ExecuteApplication.Document.CommandBars.Find(arcid.Edit_Paste).ExecuteFindLayerName'Stop the Edit OperationpEditor.StopOperation "Move Selection"bInOperation = FalseEnd Sub Public Sub FindLayerName() Dim pApp As IApplication Dim LayerName As String Dim SubType As Long Dim pID As New UID pID = "esriEditor.Editor" Set pApp = Application Set m_pEditor = pApp.FindExtensionByCLSID(pID) Dim pMap As IMap Dim pDoc As IMxDocument Dim pSel As ISelection Dim pEnumFeature As IEnumFeature Dim pFeat As IFeature Set pDoc = Application.Document Set pMap = pDoc.FocusMap Set pEnumFeature = pMap.FeatureSelection Set pFeat = pEnumFeature.Next Debug.Print pFeat.Class.AliasName End Sub