Forum

Author Topic: running script from the command line can only starts the demo mode  (Read 2617 times)

Rosy

  • Newbie
  • *
  • Posts: 21
    • View Profile
Hi,

I have a weird problem.

I have a professional license. But when I run script from the command line (on windows7) as below, it always start the photoscan without license, i.e. in a demo mode.

photoscan.exe -r <scriptname.py>

Does anyone know how to solve this? Many thanks!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: running script from the command line can only starts the demo mode
« Reply #1 on: October 04, 2018, 01:38:01 PM »
Hello Rosy,

Is there any difference in the output, if you run the following script from GUI and from the command line:

Code: [Select]
import PhotoScan
print(PhotoScan.app.activated)
Best regards,
Alexey Pasumansky,
Agisoft LLC

mcstieg

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: running script from the command line can only starts the demo mode
« Reply #2 on: July 18, 2020, 03:39:38 PM »
Hello Alexey!

Would you please give an example how the actual line would look like if I want to open Metashape Pro with python script

C:\Users\abcd\Desktop\test.py

Metashape.exe:

C:\Program Files\Agisoft\Metashape Pro\metashape.exe

Thank you!  :D

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: running script from the command line can only starts the demo mode
« Reply #3 on: August 08, 2020, 06:05:39 PM »
Code: [Select]
"C:\Program Files\Agisoft\Metashape Pro\metashape.exe" -r "C:\Users\abcd\Desktop\test.py"
Best regards,
Alexey Pasumansky,
Agisoft LLC