How to edit / delete items within a group?

Hi all,

I want to know if there is a way to iterate through the content of a group within a view of a map file. I would like to be able to find specific elements and get information about them (type of element, position / extent, text value etc) and possibly change some properties. I see functions to create entities but none to edit or delete them. Can it be done with the GX api?

So far the only option I can think of is to delete the content of the group and redraw it with the modifications I want but that doesn't seem very practical.

Any idea will be greatly appreciated!

Regards,

Karl

Comments

  • Hi Karl,

    Unfortunately you cannot edit or delete specific entities within a group. The option you had mentioned to recreate it is what I would recommend.

    Regards,
    Joseph
  • Hi Joseph,

    that's bad news. Recreating the group implies that I know exactly what was in it and where it was positioned, which is not always the case.

    A long (long) time ago, I had written applications that could read/write .plt files. It was easy to change text, line thickness, colors, merge 2 files etc. Any chance of being able to do something like this with .map files? I suppose that the file formats are documented somewhere.

    Regards

    Karl
  • Hi Karl,

    We do have loadplot.gx that can load Geosoft Plot files but I'm not sure if this what you are referring to. There are also several file formats we support which you can see under the Map > Import option in Oasis montaj. By hovering over the menu options, the status bar on the bottom will display which GX it will execute. You can then find their source code in the GX Developer installation if you are interested.

    Regards,
    Joseph
  • Hi Joseph,

    what I meant is that in the 90's, when Montaj and GX didn't exist, I had developed a series of applications that allowed me to do a bunch of stuff like read mapplot files and create plt files, edit the content of plt files, merge files, rotate grids and plt etc.

    I was just wondering if within the .map file I would be able to find the equivalent of a plt file and perhaps work directly with that. It's not something I would do right now but I'm curious to see how map files are structured.

    Anyway, what do people do when they make mistake? Like if you misspell the client's name on big project that has 256 pseudo sections and 15 maps, how do you correct that? Do you have to redo them all?

    Regards,

    Karl


  • Hi Karl,

    One suggestion would be to create a script which would load each map and remove the group in question. Then for each map, run the mapplot.gx to make the necessary edits. The mapplot.gx takes a control file as input parameter. This control file can have a set of commands for writing text, symbols and even displaying grid files. You can launch the mapplot.gx help file in Oasis montaj to see what commands are available for the control file.

    Unfortunately the API is limited in terms of editing contents within a group.

    Regards,
    Joseph
This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!