Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Invert method problem

$
0
0
Hi Experts

I try to write some codes to hide unselected features in my map. I have written some part of it. The first part of the codes must find selected features. This part works as follows.

Code:


def button3Click(self, selection):
        index = self.listbox.curselection()             
        label = self.listbox.get(index)

        # Local variables:
        layer = label

        # describe the feature layer to access the the selected set
        desc = arcpy.Describe(layer)

        # FIDSet will contain the selected features
        selectedFids = desc.FIDSet
       

        # If there are selectedFids (a selection set), write them to a new feature
        # class in the current workspace.
        if len(selectedFids) > 0:

In the other part I need to invert to find those features which are unselected. The method that I write for it doesn't work.

Code:

         
          queryList = selectedFids.replace(';', ',')

Would you help me with this method.

Best regards

Babak

Viewing all articles
Browse latest Browse all 2485

Trending Articles