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

Layer.workspacePath returns wrong value

$
0
0
Hi,

I am using ArcGIS for Desktop 10.1 SP1

I have created a database connection with name Test1 and stored in a directory as follows:
C:\Temp\Test1.sde

I right clicked the connection file in ArcCatalog --> General Tab --> Looked into the property name and noticed that it says C:\Temp\Test1.sde which is fine.

If I copy with ArcCatalog/Catalog Window the connection and place it in some other location I can confirm that these values are updated.

However, whenever you copy this using Windows Explorer these values don't change, probably as expected.

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.

This is problematic because I am determining at runtime which are the different sources in the map looping through each layer and this creates an issue. Is there a workaround for this?

Thanks in advance,
Jose

Viewing all articles
Browse latest Browse all 2485

Trending Articles