[GRASS-user] script option

Nikos Alexandris nik at nikosalexandris.net
Tue Jul 10 03:25:33 PDT 2018


* frank <frank.david at geophom.fr> [2018-07-10 08:05:29 +0200]:

>Hi dear grass users,
>
>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 :
>
>#%option G_OPT_V_MAP
>#% key: ctx_map
>#% description: vector data
>#% required : yes
>#% guidependency:layer,ctx_wf,ctx_wtg
>#%end
>#%option G_OPT_V_FIELD
>#% key:ctx_layer
>#% guidependency:ctx_wf,ctx_wtg
>#%end
>#%option G_OPT_DB_COLUMN
>#% key:ctx_wf
>#% description: wf name
>#% required: yes
>#%end
>#%option G_OPT_DB_COLUMN
>#% key:ctx_wtg
>#% description: wtg name
>#% required: yes
>#%end
>
>Thank you for your help.
>Frank

Dear Frank,

if you refer to the last two "column" options,
how do you try to access these, in the script?

Like,

options['ctx_wf']
options['ctx_wtg']

?

Also, what .xml does

x.ScriptName --interface-description

generate?

Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180710/c30f847a/attachment.sig>


More information about the grass-user mailing list