Create a workbench solution that works on a single file and then run it
in batch mode.

To run in batch either use File->Batch Deploy or run the workspace from
the command line using the command I specified before (for %%f in etc
etc)

When running in batch mode make sure that all the Feature Types (levels)
that are in your DGN files are in the workspace - which they often
aren't when you create it from a single file. The easy way around this
is to open the properties of one level and set a 'merge filter' to *
which will let all features in (if you are only calculating bounding box
that probably won't be a problem).

Attached is an example workspace.
fme_basename is exposed and used to fanout the destination (so each file
won't just over-write the previous) and there are two bounding box
transformers - one to create the entire box and the next to get the
coords of it. Group-by is set so that fme_basename can be carried
through to the output.

I copied it into my dgn directory and in a command window entered...

for %f in (*.dgn) do fme bounding-boxes.fmw --SourceDataset %f

...which ran OK (except it doesn't permit spaces in the file names).
You don't need a destination dataset since it is set in the workspace.

Can't really guess how fast it will be - you'll have to test it; but if
you want an FME solution I can't think of any other method, let alone
another method that will be faster. It seemed to take a second or two
per file - but my files aren't very large.

Hope this helps.

Regards,

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


> -----Original Message-----
> From: Kevin Gooss [mailto:[EMAIL PROTECTED] 
> Sent: January 8, 2005 11:55 AM
> To: [email protected]
> Subject: [fme] Re: Bounding Box for an entire drawing
> 
> 
> 
> 
> Microstation vba would require a license to MicroStation wouldn't it?
> Just as ArcObjects requires a license from ESRI. I am trying 
> to get this done with an fme license only.
> I don't think workbench is going to be very effective at 
> working on 180,000 drawings. How would I even load those.
> Doesn't fme have an envelope or bounding box for the whole drawing?
> 
> 
> --- In [email protected], "Mark Ireland" <[EMAIL PROTECTED]> wrote:
> > Kevin,
> > I don't see why a workbench solution won't work for you if 
> you run it 
> > from the command line.
> > Either do a batch deploy (uses TCL) or run the workspace from the 
> > command line using something like...
> > 
> > for %%f in (d:\data) do fme workspace.fmw --SourceDataset %%f 
> > --DestDataset d:\data\output
> > 
> > At least this would prevent you being limited to Access by 
> your VB app.
> > 
> > You could even try running it within Workbench - if you 
> close the log 
> > window it will run a great deal faster.
> > 
> > Regards,
> > 
> > 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
> > 
> > > -----Original Message-----
> > > From: Mark Ireland
> > > Sent: January 6, 2005 3:40 PM
> > > To: Mark Ireland
> > > Subject: Fwd: Bounding Box for an entire drawing
> > > 
> > > 
> > > --- In [email protected], "Kevin Gooss" <[EMAIL PROTECTED]> wrote:
> > > 
> > > 
> > > I am trying to extract the bounding box for a MicroStation
> > > (.dgn) drawing. 
> > > I need to do this for about 150,000 drawings so a GUI workbench 
> > > solution is not going to work for me.
> > > I would like to incorporate this into some vb.net code I 
> already have.
> > > I can get the bounding box out of workbench by using a 
> > > BoundingBoxAccumulator and then a BoundsExtractor. But the only 
> > > output I have found to handle this is an Access db. I would then 
> > > have to plumb into Access to get these values and that would be a 
> > > little more work and time (multiplied by 150,000 of course).
> > > Right now I am getting these values using ArcObjects and it is a 
> > > very slow and unreliable process (crashes every so often 
> on drawings 
> > > that are peculiar in some way).
> > > I have tried to pipe this output to a text file but it won't work.
> > > 
> > > Any suggestions?
> > > --- End forwarded message ---
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> 
> 
> 
> 
> 
> 
> 
> 
> 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
> 
> 
> 
>  
> 
> 
> 
> 


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/
 

Attachment: bounding-boxes.fmw
Description: bounding-boxes.fmw

Reply via email to