berickson23

Executing ICommandItem in vb.net

Discussion created by berickson23 on Feb 6, 2012
Latest reply on Feb 6, 2012 by berickson23
I need assistance running ArcMap built-in toolbar commands in vb.NET.

Here is a simple Sub that paused my drawing in VBA.

Public Sub pauseDrawing()
Dim pCmdItem As ICommandItem
  Set pCmdItem = Application.Document.CommandBars.Find(arcid.PanZoom_PauseDrawing)
pCmdItem.Execute
End Sub

What is the equivelant to the above in vb.NET?

I realize the ArcID is not available directly in .NET.

I have searched several sites for the solution, and found some that seem like they should work, but they do not.
If anyone can post a snippet, including all IMxDocument and IApplication initialization statements, that would be helpful.

ArcGIS: 10.0
Visual Studio: 2010
SDK: .NET

Outcomes