Extracting channel data as strings (.NET)

PontusEneberg
PontusEneberg Posts: 2 Calcite Rank Badge
edited February 2023 in GeoStudio
I've been doing custom exports that we are using, i have no problem extracting numeric data using the VA methods. But I have problems when it comes to channels that contain strings. What is the best method to extract that type of data?

Comments

  • IanMacLeod
    IanMacLeod Posts: 382 Fluorite Rank Badge
    edited October 2018
    With string data use the VV methods. Create a string VV and read the data from a database channel into the VV.

    Note that database reads will convert to the target VV type, so this will also convert numeric data to strings (formatted using the channel format style), in case that is useful.
    Geosoft logo
  • Late reply but, how would you setup with the Constant to create a VV as a string, I assume you use CVV.CreateExt() or CVV.Create() to create the VV.
  • I'm interested in the answer to this question also. I don't see a string option in the Create and CreateExt constants.
  • JosephCaluag2
    JosephCaluag2 Posts: 5 Staff
    Hello,

    Below are examples on how you would create them.

    in C#:

    using (var dbVV = CVV.Create(-GeoEngine.Core.GXNet.Constant.STR_FILE, 0)) { dh.GetDatabasesVV(dbVV); ... }

    in GXC:
    GridNameVV = Create_VV(-STR_FILE, 0);

    in Python:
    vv_agg = gxapi.GXVV.create_ext(-gxapi.STR_FILE, 0)



    Joseph