After reading through the documentation about MapDocument and Layer classes, I have been trying to use the replaceDataSource method in ModelBuilder to replace the data sources of certain layers within a map document I specify. However, it gives a runtime error even though I state the workspace (a file geodatabase), the type ("FILEGDB_WORKSPACE") and the dataset name ("fc1").
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
|
||||
|
Answer: Upon further reading of the documentation, I discovered that it is not necessary to put the feature dataset name in the workspace path (as described in the general usage section). As long as I have the following model parameters:
I used the following code:
|
||||
|
|
variable, or astring. – Get Spatial Jul 10 '12 at 7:37