Features
Support
Community
Downloads
Buy
About
Forum
Home
Search
Login
Register
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
Passing Arguments through Metashape Console to python scripts
« previous
next »
Print
Pages: [
1
]
Author
Topic: Passing Arguments through Metashape Console to python scripts (Read 3488 times)
Roy
Newbie
Posts: 22
Passing Arguments through Metashape Console to python scripts
«
on:
February 18, 2024, 10:15:18 AM »
Hello.
i'm trying to run a script from inside Metashape with the "Run Script" option.
I noticed that there is an "Arguments" row that I can put stuff in it.
How can I access to these arguments from the script itself?
Would Appreciate help.
Roy
Logged
Paulo
Hero Member
Posts: 1495
Re: Passing Arguments through Metashape Console to python scripts
«
Reply #1 on:
February 18, 2024, 02:07:15 PM »
Hi Roy,
in your script you would do the following:
Code:
[Select]
import sys
argument1 = sys.argv[1]
argument2 = sys.argv[2]
...
argumentn = sys.argv[n]
Hope this helps
«
Last Edit: February 18, 2024, 02:44:40 PM by Paulo
»
Logged
Best Regards,
Paul Pelletier,
Surveyor
Print
Pages: [
1
]
« previous
next »
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
Passing Arguments through Metashape Console to python scripts
Features
Support
Community
Downloads
Buy
About
Features
Support
Community
Downloads
Buy
About
Metashape presentation
(PDF, 5 Mb)