Hi Peter,
You'd written:
> in the newest version off fme you can read the following in the
> whatsnew.txt
> ----------------------------------------------------------
> FME_BEGIN/END_TCL: Provide an FME_MacroValues array that holds a
> dictionary keyed by macro name to macro values so that published
> parameters can easily be retrieved within begin/end Tcl scripts
> ----------------------------------------------------------
> this is cool, but is it only implemented in the workbench, at least it
is
> not working ( no array ) in a mapping file
> i am using build 4295
Well, you were right. The FME_MacroValues actually had a problem in
that it didn't work if you didn't have a FME_BEGIN_TCL. I fixed that a
couple of days ago during the prep for the announcement I'm about to
send out about this. So actually it didn't work in either Workbench or
mapping files UNLESS you had a FME_BEGIN_TCL.
But that is fixed now. And, I know you'll like this, I did all the
initial testing with mapping files, so I know it works there. Here's
what I was using incidentally:
READER_TYPE NULL
WRITER_TYPE NULL
MACRO DestDataset .\output.dwg
NULL_DATASET "$(DestDataset)"
FME_BEGIN_TCL puts $FME_MacroValues(DestDataset);
FME_BEGIN_TCL puts [array names FME_MacroValues];
FME_END_TCL puts $FME_ElapsedTime
FME_END_TCL puts [array names FME_MacroValues];
FME_END_TCL puts $FME_MacroValues(passmein);
And this doesn't work unless you pass a "passmein" macro on the command
line (i.e. fme testEndTclMacros.fme --passmein hello)
I think this, combined with the inclusion of the standard library, makes
for some very interesting possibilities.
Thanks for noticing!
Dale
----------------------------------------------------------------------
Dale Lutz Safe Software Inc. [EMAIL PROTECTED]
VP Development Surrey, BC, CANADA phone: (604) 501-9985
http://www.safe.com fax: (604) 501-9965
----------------------------------------------------------------------