Hi Mark,

AttributeTrimmer does not work with list attributes.  It uses an 
attribute that it splits inside of TCL.  So, the list is created in 
the TCL proc.

I wanted to access a list created from the WB.

The function you suggested, FME_AttributeNames returns all the 
attributes attached to a feature.  

>From what I can tell, there is no way to loop through elements as we 
did in TCL.  Interestingly, all the transformers that use lists call 
TCL instead of Tcl2, so I think this is a known thing?

The way I found to get around it is to get the number of list 
elements before entering the Tcl2 proc and use that in the for loop.

If anyone knows how to access the WB generated list array, I'd 
appreciate it.

Kathy

--- In [email protected], "mark2atsafe" <[EMAIL PROTECTED]> wrote:
>
> Hi Kathy,
> I think it would be something like...
> 
> set attrs [FME_AttributeNames]
> foreach attr attr$ {
>    set attrVal [FME_GetAttribute $attr]
> 
> etc etc
> 
> }
> 
> I got this by using an AttributeTrimmer transformer in FME2007 and
> copying/pasting it into UltraEdit!
> 
> Hope this helps
> 
> Mark
> 
> --- In [email protected], "kathy.irwin" <kathy.irwin@> wrote:
> >
> > How do I access list arrays in Tcl2?  I can't find any mention of 
lists 
> > and Tcl2 in the documentation.
> > 
> > In TCL I could get the list like this:
> > foreach {name value} [array get FME_Attributes $points
{}.SEIS_PT_LONG]
> > 
> > In new Tcl2, I tried to get the list using the new functions, but 
I 
> > can't find anything that worked.
> > foreach {name value} [array get [FME_GetAttribute points
> > {}.SEIS_PT_LONG]]
> > 
> > I'd use TCL, but the TCLCaller in WB uses Tcl2 and I'm not 
supposed to 
> > be using mapping files...
> > 
> > What I'm trying to do is loop through all the elements of my list.
> > 
> > Thanks,
> > Kathy
> >
>




For insights into what's up at Safe Software and what's on the development 
horizon, visit Safe's blog at spatial-etl.blogspot.com.

Love FME? Then open your diary to March 6-7, 2008 and write this... "Second 
Worldwide FME User Conference - Must Attend!" See 
http://www.safe.com/company/fmeuc2008/index.php for more details. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fme/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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/
 

Reply via email to