Hi
wheter your code is in the global namespace or in a proc you can use one off
these options
FME_END_TCL source {$(FME_MF_DIR)Test_FME_END.tcl} ; myProg $(macroName)
where you give the macro as a parameter to the proc starting the script
or you can just place the value in a global variable
FME_END_TCL source {$(FME_MF_DIR)Test_FME_END.tcl} ; set myVar $(macroName)
you can use this syntax when starting any kind of tcl (FME_END_, INCLUDE [
or Tcl2/TCL) as an exampel from a project i am working on right now
Tcl2 set gsPath2App $(FME_MF_DIR_UNIX)/
; \
set gsPath2Data [regsub -all -- {\\} {$(DestDataset)/$(DestFormat)}
{/}] ; \
set dbf $gsPath2App/tcl/def/$(Dataset)/felter.dbf
; \
catch { file mkdir $gsPath2Data }
; \
source $gsPath2App/TCL/ATTRIBUT.TCL
; \
source $gsPath2App/TCL/$(DestFormat)_OUT.TCL
; \
source $gsPath2App/TCL/LIB/LANUTIL.TCL
; \
main $(DestFormat)
Note: you have to sepperate the command with a ; and also note the use of
FME_MF_DIR_UNIX/ this gives a parth with / rather than \ allowing us to get
rid of the {} around the parth :-}
Peter Laulund
>From: "RichardW" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [fme] Macros, Parameters & FME_END_TCL
>Date: Tue, 20 Dec 2005 15:05:56 -0000
>
>Hi group,
>
>I am having trouble passing a parameter to a tcl script invoked by
>FME_END_TCL.
>
>I have used Tools, Edit Header to include the following:
>
># =================================================================
># Call script to log status in Oracle table
>FME_END_TCL source {$(FME_MF_DIR)Test_FME_END.tcl}
># =================================================================
>
>
>The Test_FME_END.tcl script logs the translation status in an oracle
>table. This works fine.
>
>Now I want to generalise the procedure so that the same tcl script is
>used for each transform. A parameter(s), eg administrator email, set
>in the header will pass through to the tcl script which will be
>logged in the database and used to trigger an email alert to the
>appropriate administrator.
>
>I cannot figure out how to set a parameter in the header and pass it
>to my tcl script.
>
>Can anyone help with this
>
>Thanks
>Richard
>
>
>
>
>
>
>
>
>
>
>Get the maximum benefit from your FME, FME Objects, or SpatialDirect via
>our Professional Services team. Visit www.safe.com/services for details.
>Yahoo! Groups Links
>
>
>
>
>
>
_________________________________________________________________
Del din verden med MSN Spaces http://spaces.msn.com
Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our
Professional Services team. Visit www.safe.com/services for details.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/fme/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/