Parent folder path of ActiveDesignFile.

Is there some way to get the path to the parent folder. I attempted something like ActiveDesignFile.ParentFolder, but that does not work. 

If an active design file is located in a folder:
C:\Projects\12345\Resource\test.dgn  

And I would like to attach a file referece from:
C:\Projects\12345\Survey\    is there some way to jump up one to parent folder.  .\ 

Path = .\Surey\  ??

Example in MSVBA Help
sFullFileName = ActiveDesignFile.Path & "\" & "Test.dgn"

Parents
  • Hi,

    There are a couple things you could do, depending on what you're doing.  

    1) If you command accepts relative paths then int would be "..\Survey\Test.dgn"

    2) If you need a full path, then you could use the Reverse InString command...

    Parent Folder = Left(ActiveDesignFile.Path, InStrRev(ActiveDesignFile.Path, "\"))

    --Robert

Reply
  • Hi,

    There are a couple things you could do, depending on what you're doing.  

    1) If you command accepts relative paths then int would be "..\Survey\Test.dgn"

    2) If you need a full path, then you could use the Reverse InString command...

    Parent Folder = Left(ActiveDesignFile.Path, InStrRev(ActiveDesignFile.Path, "\"))

    --Robert

Children