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. Yes, that will return a list of all the map layers. I was wondering if there was a way to reduce that list to just those layers selected by the user in the ArcMap TOC. It would allow a quick method of inputing a particular layer(s) into a script.
... View more