Hans, Thank you very much for your help.
Something come to my mind. If my ascii file is big, having thousands of features on it, is it safe to read in all the lines and processing? Is there a way to read in one feature and processing? Regards, Cindy ================================== --- In [email protected], Hans van der Maarel <[EMAIL PROTECTED]> wrote: > Cindy, > > > I am new to FME. I try to read a ascii file to FME and then transfer > > to something else (say microstation dgn). But in my ascii file, one > > feature maybe splitted to seperate line, like arcgen. The following > > is the example of my ascii file: > > ########################### > > :name my.txt 0.0,0.0,0.0 > > org 0.0,0.0,0.0 > > :pline attr level color weight > > x0, y0, z0 > > x1, y1, z1 > > :point attr level color weight x, y, z > > ############################## > > > > Should I use FME workbench or should i work in mapping file? > > > > Now I am trying to code in mapping file. But I am not fully > > understand mapping file. What kind of programming language does it > > use? > > > > I apprieciate any help from you! > > Here's what I did: > > - I created a file called input.txt, which holds the sample you included > above. Twice actually, so I can show how it handles multiple features. > - I changed the feature separation into a single # > - In the CSV input settings, I specified a character that doesn't occur > in the file at all, this way I can guarantee that every line is stored > in a single attribute. > - I added a new attribute with a default value and build a list based on > that attribute. (AttributeCreator, ListBuilder) > - I combine all the elements from this newly created list into a single > attribute (ListConcatenator) > - I split this attribute using # as the separator character > (AttributeSplitter). > > The list "list{}" now holds the original features. Every feature is > stored in a single list element. > > Hope this helps. > -- > Hans van der Maarel > Red Geographics > www.redgeographics.com / [EMAIL PROTECTED] 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/
