getting Metadata from HGD file set

MathieuOuellet
MathieuOuellet Posts: 2 Calcite Rank Badge
edited March 2023 in Oasis montaj
Hello

I can’t get the get_meta method of the GXHGD class to work.

This is what I type

import geosoft.gxapi as gxapi

h1=gxapi.GXHGD.create(“magres_final_gaspe_1998_z19_313.hgd”)

m=h1.get_meta() 

--­>TypeError: get_meta() missing 1 required positional argument: 'meta'

Somehow the method expects a meta object; but this is a get method, not a set method.

I tried passing it an empty meta object, but to no avail:

meta=gxapi.GXMETA()

m=h1.get_meta(meta)

But then I get this message:

  File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\geosoft\gxapi\GXHGD.py", line 105, in get_meta

    self._get_meta(meta)

  File "gxapi_cy.pyx", line 17497, in gxapi_cy.WrapHGD._get_meta

  File "gxapi_cy.pyx", line 11553, in gxapi_cy._raise_on_gx_errors

geosoft.gxapi.GXAPIError: GetMETA_HGD : Invalid META


The GXMETA class description has 3 arguments for all get_* methods; the last of which being the "value to set".

Can anyone help me understand (via a simple example) how the GX methods use get to apparently "set" values ?


Thanks

Mathieu