Skip to main content
Solved

Find the extents of a dwg without reading in all features

  • December 15, 2017
  • 5 replies
  • 98 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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • 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
  • 189 replies
  • December 20, 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.

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

 

 


jneujens
Forum|alt.badge.img
  • 189 replies
  • 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
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • January 8, 2018

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
  • 189 replies
  • January 9, 2018

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!