Hi JD, I get this issue arise so often that I created a custom transformer and posted it to fmepedia... FeatureMerger-1toMany
Shape data requests. Text record supplies. The text record attributes will get added to all Shape features (no need for matching IDs) - just make sure you have the correct attribute added to your destination schema. See http://www.fmepedia.com/index.php/FeatureMerger-1tomany Regards, Mark --- In [email protected], "Jason Birch" <[EMAIL PROTECTED]> wrote: > > If it's a single value, then the best approach might be global > variables. I'm not sure how this would work with an > AttributeFileReader, but the following would work if you know the name > of the text file you are reading before the translation starts. > > First, make sure that you are using a "Text File" source data set, and > that it is higher in the Workspace screen than your shapefile reader. > > Next, attach a GlobalVariableSetter to the end of this stream when you > have an attribute containing the value you want to add to all the > features > > Finally, attach a GlobalVariableRetriever to the shapefile data stream > to attach this global value as an attribute. > > Jason > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of > jamison_leach > Sent: Tuesday, October 03, 2006 09:01 > To: [email protected] > Subject: [fme] Populating a shapefile attribute with a value from an > external text file > > Good morning, > > In Workbench, I have successfully extracted a text string from an > input text file. I now need to add this text string for every record of > an attribute in a shapefile. For example, if the text file contains one > long text string relating to road condition, I extract just the portion > that reads either 'paved', 'gravel', or 'dirt'. So, if the file contains > 'paved', I'd need to add 'paved' to every record in the "Road Surface" > attribute of my shapefile. Does anyone know a good way to approach this? > I successfully wrote out the text string (such as 'paved') to an output > file using the AttributeFileWriter, but using the AttributeFileReader to > read the text string in to the shapefile's "Road Surface" attribute > didn't work, perhaps because the the file written by the > AttributeFileWriter only comes into being once I run the procedure in > Workbench. > > Regards, > JD > 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. Safe Software has also made slides available that outline enhancements planned for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 of the FME Worldwide Users Conference. To view these slides, visit www.safe.com/2006uc. 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/
