1
Air- and Liquid Filtration / Re: Add Description to Resultfile with python macro
« on: May 15, 2024, 12:46:12 PM »
Hello Mark,
you can change the result file from Python after the generation using the stringmap package. This package is described in the GeoPy scripting User Guide in the chapter "Access to GeoDict result files (*.gdr)" on page 81.
https://www.math2market.com/fileadmin/UserGuide/GeoDict2024/Automation2024.pdf
I give you a short example code to change the description in the metadata tab of a FlowDict result viewer:
Find the needed keys for the result part to change by printing the gdr in the console
Best regards,
Janine
you can change the result file from Python after the generation using the stringmap package. This package is described in the GeoPy scripting User Guide in the chapter "Access to GeoDict result files (*.gdr)" on page 81.
https://www.math2market.com/fileadmin/UserGuide/GeoDict2024/Automation2024.pdf
I give you a short example code to change the description in the metadata tab of a FlowDict result viewer:
Code: [Select]
import stringmap
gdr=stringmap.parseGDR('StokesResult.gdr')
GDR_Description=gdr['Description']
gdr['Description']='some text\n'+GDR_Description
gdr.toFile('new.gdr')
Find the needed keys for the result part to change by printing the gdr in the console
Code: [Select]
print(gdr)
Best regards,
Janine