for lyr in arcpy.mapping.ListLayers(mxd): if lyr.supports("SERVICEPROPERTIES"): servProp = lyr.serviceProperties print "Layer name:" + lyr.name print "-----------------------------------------------------" if lyr.serviceProperties["ServiceType"] == "SDE": print "Service Type: " + servProp.get('ServiceType', 'N/A') print " Database: " + servProp.get('Database', 'N/A') print " Server: " + servProp.get('Server', 'N/A') print " Service: " + servProp.get('Service', 'N/A') print " Version: " + servProp.get('Version', 'N/A') print " User name: " + servProp.get('UserName', 'N/A') print " Authentication: " + servProp.get('AuthenticationMode', 'N/A') print ""
I have noticed though, that when you get the property layer.workspacePath that this value seems to be returning the property name instead of the actual location (fullname) where the file is now placed.
Membros conectados podem publicar, acompanhar atualizações e muito mais. É novo por aqui? Crie uma conta grátis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.