Question

pass a list of microstation files to a reader


Badge
Article 000002244 seems to provide the solution I am looking for (using python script to specify feature types), but I'm unclear about setting the path for each microstation file that I am loading. I can create a list of the files I want to load to the reader, but there are multiple paths. I am creating the list by iterating through a directory and subdirectories and searching for files with microstation file extension. I'm not sure where to include the path information for each file?

4 replies

Badge
Hi,

 

 

If you are just searching specific directorys and sub-directories for DGN, why not used the "advanced browser".

 

 If you are being particular about the dgn you are loading, then you could pass in the path and filename through a python parameter (like the article) and return a concatenated list of the files to be read (formatted appropriately!). You could then set the "source dataset" parameter to take its value from the python parameter.

 

 

Cheers,

 

Todd 
Badge
Or another option is to read your text file (with each path and filename) on a new line into a featurereader (set it up to read one file at first), and then, in the navigatior window, open transformer tree and then the featurereader tree and change dataset to @Value(text_line_data)
Badge
thanks for the replies! I am not too advanced of an FME user yet.. I have many many subdirectories so I tihnk using the advanced browser might be tedious. I will try to see if I can work out the second option you posted..
Badge
I am trying to second option but don't totally understand - in the feature reader, do I load my text file with paths as the dataset? The feature reader wants to know the type of file, and I have a series of microstation v7 and v8 drawings. I don't follow the @value(text_line_data). Sorry but still new to FME!

Reply