Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

1 Answer

up vote 0 down vote accepted

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)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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