<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">Le 11/07/2018 à 09:31, Nikos Alexandris
      a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:20180711073146.5nwqdi72nj5zflnw@mail.nikosalexandris.net">*
      Frank David <a class="moz-txt-link-rfc2396E" href="mailto:frank.david@geophom.fr"><frank.david@geophom.fr></a> [2018-07-10 15:44:51
      +0200]:
      <br>
      <br>
      <blockquote type="cite">
        <br>
        <br>
        Le 10/07/2018 à 12:25, Nikos Alexandris a écrit :
        <br>
        <blockquote type="cite">* frank <a class="moz-txt-link-rfc2396E" href="mailto:frank.david@geophom.fr"><frank.david@geophom.fr></a>
          [2018-07-10 08:05:29 +0200]:
          <br>
          <br>
          <blockquote type="cite">Hi dear grass users,
            <br>
            <br>
            I'm trying to get two field name of an attribute table
            (ctx_map) by the options of the gui. But I can access only
            at the first one and I don't find why...??. See my code
            below :
            <br>
            <br>
            #%option G_OPT_V_MAP
            <br>
            #% key: ctx_map
            <br>
            #% description: vector data
            <br>
            #% required : yes
            <br>
            #% guidependency:layer,ctx_wf,ctx_wtg
            <br>
            #%end
            <br>
            #%option G_OPT_V_FIELD
            <br>
            #% key:ctx_layer
            <br>
            #% guidependency:ctx_wf,ctx_wtg
            <br>
            #%end
            <br>
            #%option G_OPT_DB_COLUMN
            <br>
            #% key:ctx_wf
            <br>
            #% description: wf name
            <br>
            #% required: yes
            <br>
            #%end
            <br>
            #%option G_OPT_DB_COLUMN
            <br>
            #% key:ctx_wtg
            <br>
            #% description: wtg name
            <br>
            #% required: yes
            <br>
            #%end
            <br>
            <br>
            Thank you for your help.
            <br>
            Frank
            <br>
          </blockquote>
          <br>
          Dear Frank,
          <br>
        </blockquote>
        Hello Nikos,
        <br>
        <blockquote type="cite">
          <br>
          if you refer to the last two "column" options,
          <br>
          how do you try to access these, in the script?
          <br>
          <br>
          Like,
          <br>
          <br>
          options['ctx_wf']
          <br>
          options['ctx_wtg']
          <br>
        </blockquote>
        Absolutely
        <br>
        <blockquote type="cite">
          <br>
          ?
          <br>
          <br>
          Also, what .xml does
          <br>
          <br>
          x.ScriptName --interface-description
          <br>
          <br>
          generate?
          <br>
        </blockquote>
        There is no error on compilation, and help tab display Flags and
        Parameters information, like (french accent are not well
        encoded):
        <br>
        <br>
        Parameters:
        <br>
        obj_map=name [required]
        <br>
        Name of vector map
        <br>
        MH ou WTG projet
        <br>
        obj_layer=string
        <br>
        Layer number or name
        <br>
        Vector features can have category values in different layers.
        This number determines which layer to use. When used with direct
        OGR access this is the layer name.
        <br>
        Default: 1
        <br>
        obj_name=name [required]
        <br>
        Nom de l'objet
        <br>
        *ctx_map=name [required] **
        <br>
        **Name of vector map **
        <br>
        *Contexte Ã©olien *
        <br>
        **ctx_layer=string **
        <br>
        **Layer number or name **
        <br>
        **Vector features can have category values in different layers.
        This number determines which layer to use. When used with direct
        OGR access this is the layer name. **
        <br>
        **Default: 1 **
        <br>
        **ctx_wf=name [required] **
        <br>
        *Nom du parc *
        <br>
        **ctx_wtg=name [required] **
        <br>
        *Identifiant Ã©olienne
        <br>
      </blockquote>
      <br>
      Ah, and what does `x.ScriptName --ui` return?
      <br>
      Maybe an encoding related issue? Related entries in trac:
      <br>
<a class="moz-txt-link-freetext" href="https://trac.osgeo.org/grass/search?q=encoding+french&noquickjump=1&changeset=on&milestone=on&ticket=on&wiki=on">https://trac.osgeo.org/grass/search?q=encoding+french&noquickjump=1&changeset=on&milestone=on&ticket=on&wiki=on</a>
      <br>
      <br>
      Nikos
      <br>
    </blockquote>
    Hello Nikos,<br>
    <br>
    x.myscript --ui just launch the gui box. <br>
    I have found a trick to run the script. Actually I need one field
    from on vector table and 2 fields from an other vector table. like
    that it works :<br>
    <br>
    #%option G_OPT_V_MAP<br>
    #% label: MH ou WTG projet<br>
    #% required : yes<br>
    #% guidependency: layer,obj<br>
    #%end<br>
    #%option G_OPT_V_FIELD<br>
    #% guidependency: obj<br>
    #%end<br>
    #%option G_OPT_DB_COLUMN<br>
    #% key: obj<br>
    #% description: Nom de l'objet<br>
    #% required: yes<br>
    #%end<br>
    <br>
    <br>
    #%option G_OPT_V_MAP<br>
    #% key: ctx_map<br>
    #% label: Contexte éolien<br>
    #% required : yes<br>
    #% guidependency:ctx_layer,ctx_wf,ctx_wtg<br>
    #%end<br>
    #%option G_OPT_V_FIELD<br>
    #% key:ctx_layer<br>
    #% guidependency:ctx_wf,ctx_wtg<br>
    #%end<br>
    #%option G_OPT_DB_COLUMN<br>
    #% key:ctx_wf<br>
    #% description: Nom du parc<br>
    #% required: yes<br>
    #%end<br>
    #%option G_OPT_DB_COLUMN<br>
    #% key:ctx_wtg<br>
    #% description: Identifiant éolienne<br>
    #% required: yes<br>
    #%end<br>
    <br>
    But as soon as I try to name myself the first table by Key parameter
    like #%key : obj_map and add key name at layer (like in the second
    part of the code) It does not work anymore... It looks like the
    fisrt map is automatically named "map" by the gui. I don't mind but
    I find this strange. I'm sure there is a explanation,somewhere...<br>
    Cheers,<br>
    Frank<br>
    <br>
    <div class="moz-signature">-- <br>
      <style>
div#signature {font-size:10px;color:#666;margin:10px 0}
span#geophom {font-size:11px;color:#A1CD1A}
div#important {font-size:10px;color:#CB110B;font-style:italic}
</style>
      <div id="signature"> <span id="geophom"><b>Geophom</b></span><br>
        327 rue de Vieille Cour 44521 OUDON<br>
        Tel +33(0)2 85 52 02 59 - Port +33(0)6 04 47 91 06<br>
        <a class="moz-txt-link-abbreviated" href="http://www.geophom.fr">www.geophom.fr</a><br>
      </div>
    </div>
  </body>
</html>