Skip to main content
I have recently had occasion to need to iterate my workspaces; that is, to run them multiple times on varying inputs.

 

 

When I need to do this on a group of files, I can pretty easily write a shell script to launch the workspace with a different input and output dataset for each of the input files.

 

 

However, I am now trying to extend this method to iterate over the feature types (in this case, Microstation .dgn levels) within a single file.  I can't seem to figure out a way to implement this, though.

 

 

I need to publish a parameter that controls which level is processed.  However, I can't seem to do that.  I can't create a reader for a single feature type and publish the parameter that picks which one (it is greyed out), and I can't read the whole file and filter it, because I can't seem to link the actual filter variables to a published parameter.

 

 

There is probably a way to do this, probably not even using shell scripts, but I can't figure out what it is.  Any ideas?
The feature types to read parameter controls the levels in the case of a dgn file  it is usually  automatically published when inserting a dgn reader.
This is it:

 

 

 

 

And if you make your reader 'Dynamic' you won't need to worry when new levels that you didn't previously know about appear in your files.

 


OK, this looks good, and I'm much closer (thank you) ... but, I'm still stuck.

 

 

When I add the .dgn writer, I can either add the feature types individually, or merge them.  If I merge them, it looks like this won't work, because the writer treats them all as one feature type (albiet with different igds_level values).  If I don't merge them, then I can't generalize the transformer, because it will only create feature type readers for those features that are in this particular .dgn.  I am trying to get it to dynamically run on those feature types (levels) that are within whatever .dgn I give it, with me only having to edit the loop in my shell script.
Hi Azeisinger!

 

 

You can try to use a FeatureReader in combination with an AttributeCreator. The AttributeCreator will take as input a text-field as a Published Parameter where you specify which Levels to load (for instance: "1201:1203" (remember, they have to be separated by a ":".

 

 


Reply