vladrostov

Relative paths in ArcScene 9.3/9.3.1 document are broken if opened programmatically

Discussion created by vladrostov on Mar 16, 2012
Latest reply on Mar 19, 2012 by vladrostov
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.

Outcomes