Geosoft mapping software for geophysics, geology, geochemistry
 

How To: Create a custom toolbar

|

Problem/Symptom:
How can I add a button in the toolbar area so that I can simply press this button and have it bring up a GX? This would be easier than always having to go through the menu items to call the GX, especially if I am constantly going back into the GX.


Environment:
This resolution applies to all versions of Oasis Montaj and Target


Resolution:

1) In C:\Program Files\Geosoft\Oasis montaj\bar, you will see your *.geobar files. These are your toolbars.

2) Copy one of these (for style and setup) and paste it to the same folder (renaming it).

3) Open that new *.geobar file in notepad, and edit it.

4) It should have the following format:

TOOLBAR "GX bar"
ITEM "Run XXXX GX..." ,magmap1.gx image.bmp[0]

Note - you need to have brackets around the image.bmp, such as shown below:

magmap1_toolbar_edited.jpg


- Here, you need the TOOLBAR line to call the toolbar
- You need to have line ITEM, followed by the title (i.e. what is called when you scroll your mouse over the button)
- In line ITEM, you need to call the *.gx
- As well, you need to call an image *.bmp file. As well, you need the square brackets behind the *.bmp with [0] (not 1 or 2) so that the first image in the BMP file is called.

5) You need to create an icon for this toolbar to call this GX. It needs to be a *.bmp file. Save your images (the bmp toolbar icons) to your C:\Program Files\Geosoft\Oasis montaj\img folder.

6) Save this geobar file. This will run the magmap1.gx when you press the button.

7) Now in Oasis, under Project Explorer, open Tools. You'll see the Toolbars, just right-click and select 'Add Toolbars', and search the \bar folder for your new toolbar. You can then load this custom toolbar. You need to browse to the \bar folder to grab it.

8) Once added, save the current Geosoft project, and close and re-open Oasis and your custom toolbar should be there.

9) To delete it, just close Oasis, delete that *.geobar file from your \bar folder, and open Oasis and it will be gone.