1

I've a list of layers of the current workspace in a combobox, but I want to list only the layers of the ArcSDE Connection, not the others I've in the TOC. How can I filter the name of this layers?

  • What do you have so far? Have you consulted the documentation? Post the code if you want help. – blah238 Mar 15 '13 at 0:30
  • Check the examples on the Layer class page (Example 3 in particular). – blah238 Mar 15 '13 at 0:35
  • In ArcMAP, I've some auxiliar shapes, orthophotos .ecw, some wms service and a group of layers into a ArcSDE Connection. Then I'm trying to list into a combobox just the layers of the ArcSDE Connection, and I need to filter those layers. – idean Mar 15 '13 at 9:29
0

Thanks Blah238! I found the solution in the exemple 3 you have mentioned.

        for layer in layers:
            if layer.supports("SERVICEPROPERTIES"):
                if layer.serviceProperties["ServiceType"] == "SDE":
                    layer_list = self.items.append(layer.name)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.