Table views from TOC in drop-down list in ArcPy - ArcGIS 10.5.1

814
5
12-20-2017 10:03 AM
MiquelRoy_Sunyer
New Contributor II

Just upgraded to ArcGIS10.5.1 and trying to run my self-made Arcpy scripts but there seems to be a problem with the drop-down lists containing table views in this new version. The problem is that a drow-down list icon should appear in the right side of the box that shows all table views loaded in TOC. However, I've noticed that this icon only appears when there are 1 or 2 dataframes in the document. When there are 3 dataframes (that's what I need and how I've been working with previous versions) the drop-down icon disappears and the only way to go is browsing through folders (folder icon) to find the db view, which btw slows down a lot the scripts.

This is how it looks like when there are 3 dataframes loaded in the doc:

Drop-down list not working

And this is the right way (seen when removing one data frame from the doc):

Drop-down list of table views

I'd like to know if someone else has noticed about this issue and if there is a simple way to fix it.

Thanks in advance,

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

Are all the tables in the same location? or in different folder paths?

0 Kudos
MiquelRoy_Sunyer
New Contributor II

They are form different databases. However, the problem seems to be related with the presence of 3 dataframes, because when I leave only 2 dataframes, the drop-down icon appears.

0 Kudos
DanPatterson_Retired
MVP Emeritus

To rule out the database type and/or source, start a new project and use only one database in the project... open 3 dataframes sequentially and observe the pattern.  If the pattern is as you describe, then there is something amiss.  If the pattern isn't as you describe, then it may have something to do with the source location and/or type in combination with the dataframes.  With this documentation, if there is indeed an issue, then you will have to contact tech support since you indicate that it is your custom tools and not system tools

MiquelRoy_Sunyer
New Contributor II

Thanks for your help, I've finally determined that the drop-down list only answers to the Active dataframe. If my active dataframe is empty, no drop-down list will appear. And only the views loaded in the active dataframe are shown in the dropdown list. So I've had just to change the active dataframe to the one that has all the dataviews and run the tool as always.

This behavior is new, at least from 10.3.1 version, I never noticed before.

James_LukeBlair
New Contributor

I'd like to breathe life back into this as I've been battling the same issue (10.5.x).  I have a python toolbox and encounter losing the dropdown to select layers in the TOC. It seems to happen at random, and typically after opening and closing a tool multiple times while testing.  I have two tools that use a parameter data type "layer" and both experience the same issue. For a while I thought if I were to check boolean parameters before selecting a layer, that would cause the "disappearance" of the dropdown.  So I made all parameters inactive until a layer is selected, but I still encounter the problem.  After reading this thread I waited until it happened again and tried to "activate" the lone data frame, but it didn't fix the issue.  When this occurs neither of the two tools allow for the layer selection.  Removing the toolbox and re-adding doens't fix it, starting a new ArcMap and re-adding the tbx doesn't fix it.  Only a complete exit and re-start of ArcMap will fix it.  And yes, it has happened on completely different computer running 10.5.  Here is what I am looking at when it occurs (10.5.1):Notice no dropdown for layer selection

0 Kudos