Hi Matt,
That sounds like a good concept for a transformer. It would have value
as a publishable parameter to a workspace as well. Workbench is getting
more and more like a drag-and-drop programming language...
I was wondering if StringReplacer was undergoing some changes; there
were some debugging statements coming out in the log window ("woo" and
"something") :)
Jason
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Matt
Adam
Sent: Monday, February 27, 2006 10:42
To: [email protected]
Subject: Re: [fme] Re: ValueReplacer
Hi Jason, Mark...
Yes, a "published pick list" of sorts is something that has been
requested, but I can't confirm that it will be done for any particular
version of FME. I'd like to get it done for FME 2007, but no promises.
The idea we're working with right now is a new transformer that will be
somewhat like the AttributeFilter: you will fill out a list of possible
values in the parameters dialog, and each possible value will become a
new output of the transformer. You will be able to publish a parameter
on this transformer that will be a drop list of all the possible values,
letting the user pick this value at runtime. For whichever item was
selected, the corresponding output gets all the features. Think of it
as a kind of 'switch' statement for FME.
Any thoughts on this?
As for the StringReplacer, I did indeed make some changes to this
transformer recently (you now shouldn't have to use odd tricks like the
[ ] one below, all characters should "just work"), however I apparently
removed the ability to have a null string in the process. Oops. This
will be fixed in the next FME beta.
--
--------------------------------------------------------------
Matt Adam [EMAIL PROTECTED]
Developer, Safe Software Inc. (604)501-9985 ext.234
--------------------------------------------------------------
mark2atsafe wrote:
> Hi Jason,
> I think a published pick-list is something that is probably already
> on our radar screens (Matt are you reading this? Can you confirm?) -
> I'd certainly like to have a GUI option for this - up till now I've
> been editing the header to create such a list.
>
> For the space replacer use a StringReplacer.
> In the regular expression use [ ] to define a space - ie the space
> char needs to be in between square brackets. Then leave the
> replacement text empty to replace each space with 'nothing'.
>
> Actually - I think stringReplacer has changed. It doesn't appear to
> work any more. You can replace the space with a character, but not
> with nothing. I copied in an old stringReplacer from a previous
> workspace and it works fine, so if you can, do that. The old version
> has a setting 'regular expression' instead of the newer 'string to
> find'. In the meantime I'll file a PR.
>
> Mark
>
> --- In [email protected], "Jason Birch" <[EMAIL PROTECTED]> wrote:
>
>>Hi Mark,
>>
>>I'll have a go at a Custom Transformer.
>>
>>Is there any way of publishing a list of options (for a drop-down
>>selection) from within a custom transformer? If not, can I put in
>
> an
>
>>enhancement request for that? It would be useful for yes/no type
>>options as well as conditional processing based on a larger set of
>>values.
>>
>>While I'm here, I've been having problems trying to figure out how
>
> to
>
>>strip all internal spaces from a string. I've been playing around
>
> with
>
>>StringReplacer and StringPairReplacer with no luck. Any ideas?
>>
>>Thanks,
>>Jason
>>
>>
>>
>>-----Original Message-----
>>From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
>>mark2atsafe
>>Sent: Monday, February 27, 2006 09:14
>>To: [email protected]
>>Subject: [fme] Re: ValueReplacer
>>
>>A better way would be to encapsulate the Tester and AttributeSetter
>>inside a custom transformer. It'll help tidy the workspace and you
>
> may
>
>>be able to publish and share some of the parameters so you aren't
>
> having
>
>>to set them in so many places.
>>
>>Alternatively the StringReplacer might be of use. If you set the
>
> output
>
>>attribute name to be the same as the source you wouldn't need an
>>AttributeXxxx transformer and I don't think there would be any
>
> problems.
>
>>Again you could publish the regular expression or replacement text
>>settings to avoid having to set them multiple times.
>>
>>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], "Jason Birch" <jason.birch@> wrote:
>>
>>>Hi all,
>>>
>>>I'm looking for a transformer or procedure that mimics the
>
> behaviour
>
>>>of the NullAttributeReplacer, but with a different value than
>
> NULL.
>
>>>For instance, I want to replace the value of a list of attributes
>
> with
>
>>>the word "UNKNOWN" if their current value is "0". Currently, I'm
>>>using a huge string of Testers and AttributeSetters, but there
>
> has to
>
>>>be a better way...
>>>
>>>Thanks,
>>>Jason
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/