Hi
in TCL there is a global array called env(), this array contains all
enviroment variabels under windows
you can access it using this syntax
set myVar $env(varName)
if you are in a proc you first have to declare the variable as a global var
or alternativly use this syntax
set myVar $::env(varName)
I use this a lot to set up the patrhs a sytem use, if first my variabels are
set I can move my mapping file to any machin at it will be running
NOTE If the variable is a parth remember to substitute \ with / to avoide
problems with \ dissapering
you can use this syntax
set gsPath2Temp [regsub -all -- {\\} $env(TEMP) {/} ]
Peter Laulund
National Survey and Cadastre, Denmark
>From: "mark2atsafe" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [fme] Re: TLCaller and variable of environment
>Date: Tue, 14 Jun 2005 16:44:06 -0000
>
>You can access an environmental variable as a Macro in FME using
>'squiggly' brackets - eg ${FME_MF_DIR} or ${ORACLE_HOME}
>
>I'm not sure if you can do that directly in a TCL script, but you
>could use an AttributeCreator to create an attribute from the Macro
>(put the macro in the right hand field in the transformer settings
>instead of a value) then use that in the TCL
>
>J'esp�re que ceci r�pond � votre question.
>
>Mark
>
>Mark Ireland, Product Support Engineer
>Safe Software Inc. Surrey, BC, CANADA
>[EMAIL PROTECTED] http://www.safe.com
>Solutions for Spatial Data Translation, Distribution and Access
>
>--- In [email protected], "pyjoubert" <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I would like to position a variable of environment under Windows and
> > read the value of this variable of environment in TCL by using TCLCaller
> >
> > How to make ?
> >
> > Thank you
>
>
>
>
>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
>
>
>
>
>
>
_________________________________________________________________
Log p� MSN Messenger direkte fra nettet http://webmessenger.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/