Forum

Author Topic: Relative path to a file  (Read 1358 times)

Tdk

  • Newbie
  • *
  • Posts: 3
    • View Profile
Relative path to a file
« on: February 05, 2021, 05:27:59 PM »
Is it possible to use the relative path to a file ?

I want to load my point coordinates, which are always in the same folder as my Metashape project. Thus, the folder changes everytime I create a new project.

How to get the path to the file ?Also, is it possible to concatenate characters (path + file name) ?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Relative path to a file
« Reply #1 on: February 05, 2021, 08:27:28 PM »
Hello Tdk,

You can get the path to the project by calling doc.path (providing that doc is a variable of Metashape.Document class), with that you can get the folder path and add the relative path to the required file.
Best regards,
Alexey Pasumansky,
Agisoft LLC