Solved! Go to Solution.
now is this something where you know which layer is to be selected, or you're trying to figure it out?
If you already know the layers in the TofC, you can list them using the following in the python window
[HTML]mxd = arcpy.mapping.MapDocument("insert path to mxd here, or if within arcmap use "CURRENT" ")
arcpy.mapping.Listayers(mxd)[/HTML]
That will get you all of the layers in the TOC. If it's more than that, then I don't think I'm quite clear on what you're looking for. I'm not a VB guy, so I don't know what IMXDocument::SelectedItem actually means.
>>>mxd = arcpy.mapping.MapDocument("current") >>>lyr = arcpy.mapping.ListLayers(mxd)[0] >>> desc = arcpy.Describe(lyr) >>> print desc.shapeType Point