Extracting channel data as strings (.NET)

PontusEneberg
edited October 2018 in GX Developer
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
    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.
  • 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
Sign In or Register to comment.

Howdy, Stranger!

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