-
Moved: Simple new database example
This discussion has been moved.
-
Moved: .NET documentation bug
This discussion has been moved.
-
Moved: MSBuild Extension Pack
This discussion has been moved.
-
Moved: CGXNetCore, creating objects
This discussion has been moved.
-
Moved: .Net - ToolControl closing form
This discussion has been moved.
-
Moved: GX for plotting additional geological symbols in montage?
This discussion has been moved.
-
Moved: Resampling a geophysical log to a fixed interval
This discussion has been moved.
-
PB writing GX extensions with Python - does not import matplotlib
Hello, I have some issues trying to write GX extensions with Python. In fact, it seems that it is not possible to import matplotlib packages, nor PyQT5 packages. Is it a known limitation or can I try to fix it? It seems to me that it has to do with the “backend” choice, but I’m not sure and do not know that domain well……
-
python_desktop_setup.gx not properly working
I am on Anaconda3 Python 3.61 Oasis Montaj 9.3.1 I downloaded the python_desktop_setup.gx However, when I run it, I get the prompt to enable that menu but the menu is not available in the menu manager. I get no error or anything. Any help?
-
PDF from a map in a Python script
Hello, I am trying to make a PDF from a map in a stand alone python script - does anyone have any examples of how to do this? I have tried the gxapi.GXPDF3D.export_2d() function and this does produce a pdf, but it is tiny. I don't understand how this function is supposed to works as there is no place to input a page…
-
Python gdb.read_channel error
I updated some files to resolve some scipy.linalg issues and now my simple, old code that used to work no longer runs. The code creates a Geosoft context, prints out the geosoft userid, opens a Geosoft data base, and reads data from a channel. It now fails at this line: X_data, fid = gdb.read_channel(line,…
-
def rungx() makes my script fail
Hello, I understand that I need the rungx() if I am running a python script from Oasis. But I don't understand this result: This code works:import geosoft.gxpy as gxpy
import geosoft.gxpy.grid as gxgrd #def rungx():
# raise Exception("This is not an Oasis extension. Please run through a python interpreter.") gxc =…
-
gxcpp_geogx.h using c++ keyword for method name - does not compile!
I have just started to use the C++ variation of GX Core v9.5 and I can not even compile a simple program as the GXRGRD class has one of it's methods name 'default' which is a C++ reserved keyword and can not be used. int32_t GXRGRD::default(const gx_string_type& param1, GXDATPtr param2) Can this please be fixed?
-
gxpy write_channel method
When trying to create an array channel using the gxpy library, I get an issue with the write_channel method. I get the following error : AttributeError: 'numpy.ndarray' object has no attribute 'width' I am unsure what the issue is but I suspect that it might be something to do with line 1918 in gdb.py which has the…
-
SOLVED: First and Next Selected Line
Hi all, I recently created a button attached to a gx that would scroll through the selected lines in a project (as opposed to the next line). It was a very simple code and seemed to work fine. EData = Current_EDB(); Line = GetCurLineSymb_EDB(EData); Data = Lock_EDB(EData); Line = NextSelLine_DB(Data,Line);…
-
Create a Menu to Run Python Extensions
I'm starting in Python and I could not create a menu by following the procedure below: Can anyone help me? I want to call hello world on the menu at oasis montaj
-
SOLVED: Setting a colour ramp through a gx
Hi all, I'm trying to set up a gx to change the colour ramps of multiple AGGs in a map. I have everything working now expect setting the colour ramp from a .tbl file. I couldn't find a gx function for this so I tried recording a script and using the SetString_SYS() function to set the input parameters into the parameter…
-
Python GX install failing
I have Anaconda Python 3.7.1 installed with Oasis 9.5.1. I have installed the Geosoft GX via pip install Geosoft. I have added the python tools to Geosoft. I have set the Python directory in Geosoft (C:\Users\\AppData\Local\Continuum\anaconda3) and restarted everything. When I hit Python->Verify Python in OM I get the…
-
Python GX: get_user_input with output of project_grids
I have a get_user_input dialog that prompts the user to pick an existing grid from the project: # ask the user to select a grid grid_file = gxproj.get_user_input(title='Specify existing TMI grid', prompt='TMI grid:', kind='list', items=project.project_grids, default=default_grid) The list usually works fine, but when I run…
-
Documentation Errors
Hi. Since I didn't find a place to report errors in the doc, I'll do it here. On https://geosoftgxdev.atlassian.net/wiki/spaces/GXD94/pages/430211115/Release+Notes the geosoft.gxpy.grid_utility Utilities Hyperlink links to the wrong Doc page.
-
How to set/query TITLE parameter when creating a GXF file using Python API?
I created a working python script that creates a GXF file from scratch. What function is used to set the TITLE string for the GXF file? Or to query it, for that matter? #TITLE #POINTS 108 #ROWS 107 #SENSE 1 ...
-
gxpy -gxdb.create_line_name
Hi All I have been using a script that imports LiDAR data to a gdb. It has stopped working recently due to a line that creates the line name to write, as follows: with gxdb.Geosoft_gdb.open(saveFileName) as gdb: line_name = gxdb.create_line_name(lineName, gxdb.LINE_TYPE_RANDOM, 0) gdb.write_line(line_name, xyz,…
-
Geosoft API Python 9.5.0
I have the following error with 9.5.0. The same program and dataset was working fine with 9.4.0. File "C:\Users\Marc\Documents\Logiciels\aeminv\aeminv\data.py", line 45, in loadlinedata self.time, ch, self.fid = self.dataparameters.gdb.read_line(linenumber, channels=[self.dataparameters.timechannel]) File…
-
Voxel Math
Hi, I am trying to write some python code to do the following. 1) Open a geosurface file 2) Iterate through the surfaces in the file a) extract the extents of the surface b) create a voxel covering the extents, all value = zeros c) use voxel math to change all cells inside the surface to 1 and outside to DUMMY d) save the…
-
Creating an executable file from a Python script
Hi, I wrote a Python script to calculate the time decay constant for time-domain EM data, and it works well. But when I build an executable file from the Python script using cx_Freeze, I can't run the program. I get an Python error of "File NotFoundError" (attached image) caused by a file named…