+ Reply to Thread
Results 1 to 3 of 3

Thread: Problems with ArcPy replaceWorkspaces and findAndReplaceWorkspacePaths validation

  1. #1
    Randy .
    Join Date
    Apr 2010
    Posts
    260
    Points
    12
    Answers Provided
    0


    0

    Default Problems with ArcPy replaceWorkspaces and findAndReplaceWorkspacePaths validation

    Our ArcSDE/SQL servers are 6 years old so we are migrating to new hardware. The server name and IP address are changing so all MXDs are going to break. We are also taking the "opportunity" to implement windows authentication for SDE connecitons.

    I've been testing out ArcPy scripts using both the replaceWorkspaces and findAndReplaceWorkspacePaths commands but have run into problems with each. The findAndReplaceWorkspacePaths command seems to ingore the validation setting when set to false. It works in the replaceWorkspaces command but python crashs at the mxd.saveACopy command whenever the MXD contains a image services.

    Anyone else experiencing these problems?

    # This works where there are image services in the MXD
    for myDataSource in uniqueDataSourceList:
    mxd.replaceWorkspaces(myDataSource, "SDE_WORKSPACE", outputGDB, "SDE_WORKSPACE")
    mxd.saveACopy(outputMXD, '9.3')

    # This crashes if there are images services in the MXD
    for myDataSource in uniqueDataSourceList:
    mxd.replaceWorkspaces(myDataSource, "SDE_WORKSPACE", outputGDB, "SDE_WORKSPACE", False)
    mxd.saveACopy(outputMXD, '9.3')

  2. #2
    Jay Cummins
    Join Date
    Apr 2010
    Posts
    15
    Points
    1
    Answers Provided
    0


    0

    Default Re: Problems with ArcPy replaceWorkspaces and findAndReplaceWorkspacePaths validation

    Yes. NIM060315

    Quote Originally Posted by kreuzrsk View Post
    Our ArcSDE/SQL servers are 6 years old so we are migrating to new hardware. The server name and IP address are changing so all MXDs are going to break. We are also taking the "opportunity" to implement windows authentication for SDE connecitons.

    I've been testing out ArcPy scripts using both the replaceWorkspaces and findAndReplaceWorkspacePaths commands but have run into problems with each. The findAndReplaceWorkspacePaths command seems to ingore the validation setting when set to false. It works in the replaceWorkspaces command but python crashs at the mxd.saveACopy command whenever the MXD contains a image services.

    Anyone else experiencing these problems?

    # This works where there are image services in the MXD
    for myDataSource in uniqueDataSourceList:
    mxd.replaceWorkspaces(myDataSource, "SDE_WORKSPACE", outputGDB, "SDE_WORKSPACE")
    mxd.saveACopy(outputMXD, '9.3')

    # This crashes if there are images services in the MXD
    for myDataSource in uniqueDataSourceList:
    mxd.replaceWorkspaces(myDataSource, "SDE_WORKSPACE", outputGDB, "SDE_WORKSPACE", False)
    mxd.saveACopy(outputMXD, '9.3')

  3. #3
    Randy .
    Join Date
    Apr 2010
    Posts
    260
    Points
    12
    Answers Provided
    0


    0

    Default Re: Problems with ArcPy replaceWorkspaces and findAndReplaceWorkspacePaths validation

    Quote Originally Posted by CumminsJP View Post
    Unfortunately, this bug is not among the listed bug fixes for SP1

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts