Hi,
in my reader, I use the GUI TYPE "DYNAMIC_MULTI_SELECT_COMMAS" C1] so a user can selects/types some values. The sections in my metafile are:
DEFAULT_MACRO HOST localhost
DEFAULT_MACRO PORT 8080
! ...some more code
DEFAULT_VALUE HOST $(HOST)
GUI STRING HOST Host:
DEFAULT_VALUE PORT $(PORT)
GUI RANGE_SLIDER PORT 0%65535%0%OFF Port:
DEFAULT_VALUE LAYERLIST $(LAYERLIST)
GUI OPTIONAL DYNAMIC_MULTI_SELECT_COMMAS LAYERLIST HOST,$DHOST],PORT,$_PORT] Layer Names:
This works fine, but whenever I start a translation, I get the error:
Undefined macro `HOST_MYREADER_1' dereferenced in file `C:\Users\User\AppData\Local\Temp\wb-xlate-1456160185578_8088'
Program Terminating
Translation FAILED.
caused by $rHOST] in the DYNAMIC_MULTI_SELECT_COMMAS line. I can fix this by generating a Published Parameter called HOST_MYREADER_1 in my workspace, but I would like to understand the error. What is the problem here? I have created a macro called Host (and Port), why does FME crashes here?
Another solution is
DEFAULT_VALUE LAYERLIST $(LAYERLIST)
-GUI OPTIONAL DYNAMIC_MULTI_SELECT_COMMAS LAYERLIST HOST,$sHOST],PORT,$>PORT] Layer Names:
Layer Names does not appear in the readers`s parameter, the translation runs without errors. However, I prefer the first approach.
Thank you very much!
ben
p1]
http://docs.safe.com/fme/2014/html/FME_GuiType/doc_pages/dynamic_multi_select_commas.txt