# Layername or Source, Layername or SourcePath, Connect To, Featureclass Layername,Artwork,Database Connections\PublicUser.sde,SDE.Artwork Source,C:\Documents and Settings\user\Application Data\ESRI\ArcCatalog\publicuser.sde\SDE.BaseMap\SDE.Call_Box,Database Connections\user.sde,SDE.Call_Box
c:\Temp>cls && python changedatasource.py --dirpath c:\temp --norecurse --infile c:\temp\replace.txt --filelist c:\temp\test.mxd
c:\Temp>cls && python changedatasource.py --dirpath c:\temp --norecurse --filelist c:\temp\test.mxd --dest "Layername,Artwork,Database Connections\PublicUser.sd e,SDE.Artwork" --force
If you're still interested, I took this a little farther, maybe overkill but...It will use a text file for input or from command line. It will also walk a directory structure.c:\Temp>cls && python changedatasource.py --help to see the options.Text file looks like: # Layername or Source, Layername or SourcePath, Connect To, Featureclass Layername,Artwork,Database Connections\PublicUser.sde,SDE.Artwork Source,C:\Documents and Settings\user\Application Data\ESRI\ArcCatalog\publicuser.sde\SDE.BaseMap\SDE.Call_Box,Database Connections\user.sde,SDE.Call_Box Syntax for file input would be: c:\Temp>cls && python changedatasource.py --dirpath c:\temp --norecurse --infile c:\temp\replace.txt --filelist c:\temp\test.mxd Syntax for command line would be: c:\Temp>cls && python changedatasource.py --dirpath c:\temp --norecurse --filelist c:\temp\test.mxd --dest "Layername,Artwork,Database Connections\PublicUser.sd e,SDE.Artwork" --force A note about the sample syntax. If --filelist is specified, --dirpath and --norecurse are ignored.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.