Skip to main content
Solved

Find the extents of a dwg without reading in all features

  • December 15, 2017
  • 5 replies
  • 62 views

Forum|alt.badge.img+1

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!!

Best answer by fmelizard

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.

View original
Did this help you find an answer to your question?

5 replies

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • Best Answer
  • December 15, 2017

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.


jneujens
Forum|alt.badge.img
  • December 20, 2017
fmelizard wrote:

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! :)

 

 


jneujens
Forum|alt.badge.img
  • December 21, 2017

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


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 8, 2018
jneujens wrote:

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!

 


jneujens
Forum|alt.badge.img
  • January 9, 2018
jneujens wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings