Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: SamT on June 15, 2020, 01:02:34 AM

Title: Export Report User Settings
Post by: SamT on June 15, 2020, 01:02:34 AM
Hi Everyone!

Having some trouble adding user settings to exportReport().

User manual specifies "list of (string, string) tuples" for the user_settings parameter.

Code: [Select]
import os

import Metashape

doc = Metashape.app.document
chunk = doc.chunk

user_settings = [('Test 1', 'Value 1'), ('Test 2', 'Value 2')]

output_file = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop/test.pdf')
chunk.exportReport(path=output_file, user_settings=user_settings)

Error: ValueError: Invalid argument value: user_settings

Metashape version 1.6.2
Title: Re: Export Report User Settings
Post by: Alexey Pasumansky on June 27, 2020, 02:27:14 AM
Hello SamT,

Similar example works fine in Metashape 1.6.3 (build 10732).
Title: Re: Export Report User Settings
Post by: PeterBetlem on July 12, 2023, 04:54:29 PM
Was this solved? experiencing the same in v2.0.2.

EDIT: Nevermind, sorted itself after a restart of the kernel.