Identify Route Location GUID different in .NET?

498
2
Jump to solution
06-06-2014 10:00 AM
SteveCole
Frequent Contributor
Finally getting around to porting a VBA based toolset to an addin using .NET. On a dialog, I include a button for my users to quickly change their active tool to ESRI's Route Identify tool. Under VBA, this was referenced as arcid.Lr_Route_Identify and the UID was/is "{6C3CC7D2-0EA4-43A0-88C3-911FEDCBF268}".

I'm trying to do the same thing on the .NET side but that UID isn't listed in the documentation. The tool still exists so I'm not sure what to do here.

My little .NET code is like this:
    Private Sub cmdRteIdentify_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdRteIdentify.Click         Try             'Changes the current tool to the Route Identify Tool             Dim application = My.ArcMap.Application             Dim pUID As New UID              pUID.Value = "esriArcMapUI.SelectTool"             application.CurrentTool = application.Document.CommandBars.Find(pUID)         Catch ex As Exception             globalErrorHandler(ex)         End Try     End Sub


Should I just use the "{...}" value in my routine and just ignore the fact that I can't find the appropriate "esriArcMapUI.x" equivalent? I like using the latter since it's a bit more reader friendly for understanding the code later on down the line.

Thanks!
Steve
0 Kudos
1 Solution

Accepted Solutions
NeilClemmons
Regular Contributor III
The ProgId for the route identify tool is esriLocationUI.RouteIdentifyTool.  I found this by looking up {6C3CC7D2-0EA4-43A0-88C3-911FEDCBF268} in the system registry.  You should be able to use either in your code, but like you, I prefer to use the ProgId since it's more readable.

View solution in original post

0 Kudos
2 Replies
NeilClemmons
Regular Contributor III
The ProgId for the route identify tool is esriLocationUI.RouteIdentifyTool.  I found this by looking up {6C3CC7D2-0EA4-43A0-88C3-911FEDCBF268} in the system registry.  You should be able to use either in your code, but like you, I prefer to use the ProgId since it's more readable.
0 Kudos
SteveCole
Frequent Contributor
Awesome. Thanks Neil!
0 Kudos