Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

When I open ArcScene document with relative paths programmatically from ArcMap, all those paths are broken. The location in source tab for broken layers is set to some different path like "C:\Windows\System32" or "C:\Windows".

Below is the code sample I use to open document. Both ArcMap and ArcScene projects are located in "C:\test" and so are files added to ArcScene doc.

Sub test_relpaths()
  Dim pDoc As IDocument
  Set pDoc = New sxDocument
  Dim iApp As IApplication
  Set iApp = pDoc.Parent
  iApp.OpenDocument ("C:\test\test_relpaths.sxd")
End Sub

When I use similar code to open ArcMap doc from ArcScene, everything is fine, relative links are kept:

Sub test_relpaths()
  Dim pDoc As IDocument
  Set pDoc = New mxDocument
  Dim iApp As IApplication
  Set iApp = pDoc.Parent
  iApp.OpenDocument ("C:\test\test_relpaths.mxd")
End Sub

Can anyone please help me to fix this issue or tell if it's a bug.

Update: I've installed 9.3.1 with SP2 and some patches, but it didn't help.
Update2: I've also tested these samples in ArcGIS Desktop 10 SP3 and results are the same. It seems like an ArcScene bug.

share|improve this question
    
Hi @Vlad and welcome to the site. Can you please confirm that when you open the SXD normally that the relative paths are in fact not "broken". (this should be the same document you are attempting to open programmatically on the same machine) –  Jakub Mar 15 '12 at 12:57
    
Hi, @Jakub! Sorry for having missed it in my question. If I open SXD doc manually, all paths are correct. And they are correct when I reopen SXD after attempt to open it from ArcMap. –  Vlad Mar 15 '12 at 13:24
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.