2013-11-14

Define Macros in a Scripted (Tcl) Parameter

Just write a line like this in the script, then a macro (parameter) named MY_PARAM can be used in the workspace. But the name will not appear in parameter list of the Workbench interface.
-----
puts "MACRO MY_PARAM Value"
-----

As far as I know, this is the only way to define macros (parameters) by scripting. I found this way when I was learning about Scripted (Tcl) Parameter, but I couldn't imagine a case in which it's necessary or effective.
In fact, the example I posted to this thread is the first one that I defined macros in a Scripted (Tcl) Parameter for practical use.
Community > Issues with Python script in FME (working script outside FME)

Naturally it's not essential to define such a script in this case; it can be replaced with three scripted parameter definitions.
Well then, can I say that it is better than other approaches?

No comments:

Post a Comment