Skip to main content

Hi,

Is there a way of finding the min x, max x, min y and max y cords of a DWG file without reading the whole file and then using 'BoundingBoxAccumulator'?

The file is very large so I don't want to have to read it all first.

I am using FME 2017.0 64 Bit Desktop.

Thanks!!

Hi @aquamarine,

**UPDATE** The below seems to be applicable to versions of FME 2018 and higher

 

 

If you turn on the Read Drawing System Variables in the reader parameters (below) then the first read feature (on the '0' layer) will be the autocad_info entity. It contains format attributes attributes called autocad_extmax_x, autocad_extmax_y, autocad_extmin_x andautocad_extmin_y. You can use these to create the min max extents of the drawing.

 

The autocad_info features should be the first feature read so if you set the reader to just read the first feature it should contain the info you need. I haven't fully tested this but it worked with the files that I tested.


Hi @aquamarine,

**UPDATE** The below seems to be applicable to versions of FME 2018 and higher

 

 

If you turn on the Read Drawing System Variables in the reader parameters (below) then the first read feature (on the '0' layer) will be the autocad_info entity. It contains format attributes attributes called autocad_extmax_x, autocad_extmax_y, autocad_extmin_x andautocad_extmin_y. You can use these to create the min max extents of the drawing.

 

The autocad_info features should be the first feature read so if you set the reader to just read the first feature it should contain the info you need. I haven't fully tested this but it worked with the files that I tested.

I did not know that, but that is very interesting! :)

 

 


MattAtSafe

Are there any other prerequisites for this to work? Maybe the version of FME? I just tested this on a .dwg, with the exact same reader parameters. I get pretty much the same result but without attributes related to the spatial extent.

 

 

My .dwg is added below.

delta-report.dwg


MattAtSafe

Are there any other prerequisites for this to work? Maybe the version of FME? I just tested this on a .dwg, with the exact same reader parameters. I get pretty much the same result but without attributes related to the spatial extent.

 

 

My .dwg is added below.

delta-report.dwg

Hi @jneujens,

 

It does seem like the version of FME might be important. Reading with FME 2018 beta these data show up, however, I couldn't see these with the 2017.1 FME, I was unaware that this was a new feature! and I'm sorry for the delay in my response I was out of the office!

 


MattAtSafe

Are there any other prerequisites for this to work? Maybe the version of FME? I just tested this on a .dwg, with the exact same reader parameters. I get pretty much the same result but without attributes related to the spatial extent.

 

 

My .dwg is added below.

delta-report.dwg

MattAtSafe , good to know! Many thanks to for your response!

 

 


Reply