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.
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 ""
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.