<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 10/07/2018 à 12:25, Nikos Alexandris
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:20180710102533.h6ag5nrab5kxla4n@mail.nikosalexandris.net">*
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"
cite="mid:20180710102533.h6ag5nrab5kxla4n@mail.nikosalexandris.net">
<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"
cite="mid:20180710102533.h6ag5nrab5kxla4n@mail.nikosalexandris.net">
<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>
<b>ctx_map=name [required] </b><b><br>
</b><b>Name of vector map </b><b><br>
</b>Contexte éolien <b><br>
</b><b>ctx_layer=string </b><b><br>
</b><b>Layer number or name </b><b><br>
</b><b>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. </b><b><br>
</b><b>Default: 1 </b><b><br>
</b><b>ctx_wf=name [required] </b><b><br>
</b>Nom du parc <b><br>
</b><b>ctx_wtg=name [required] </b><b><br>
</b>Identifiant éolienne <br>
<blockquote type="cite"
cite="mid:20180710102533.h6ag5nrab5kxla4n@mail.nikosalexandris.net">
<br>
Nikos
<br>
</blockquote>
Frank<br>
<br>
<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>