Question

set extent when writing .dwg

  • 15 December 2014
  • 4 replies
  • 15 views

Badge
Hi everyone.

 

I write data using AutoCAD DWG/DXF writer. Everything works fine but after opening the file, users allways have to click "fit to view" (microstation) to see the data - and the ones that are not very familiar with microstation don't find the data at all.

 

Is there the possibility to write the data's extent to the file? Maybe by using one of the various autocad_... format attributes?

 

Thank you very much fot your help!

 

Simon

4 replies

Badge

Hi Simon,

 

How does AutoCAD usually handle loading new data (I'm not familair with AutoCAD)? I'd expect any decent system should automatically zoom to the data extent of the layer.

 

A quick search doesn't find anything in the FME help about it, and a few seconds googling didn't find anything special about zoom-to-extent for AutoCAD.

 

Are you sure it's something that needs to be set within the file? Maybe you have a rogue feature that's giving you a very large extent?

 

Sorry I can't be more help,

Cheers,

 

Jonathan
Badge
Thank you for your answer Jonathan. To view my data I use Bentley Microstation V8i and there I can save the extent (after I set it correctly) using "File\\save settings" or CTRL+F. I thought since it can somehow be saved to the file there must be the possibility to also  let FME set it (using a format attribut or so) and not just trusting the user's programm to interpret the file correctly.

 

Googling was not of any help for me either. After hours, not seconds.

 

Simon
Badge

I have this same issue. Literally everyone expects a drawing or model to be zoomed to its extents when they open it. I used AutoCAD for years and it was a rule. Not to mention, as @simon11 said, it's confusing when users open a dwg and see nothing. So writing DWGs automatically should provide for this.

As far as I can tell after 3 years this question hasn't been answered here. So like @simon11, I dug around the interweb for a solution, and found this exchange on the Autodesk RealDWG SDK forums. The trick is in writing to the Active viewport table in the DWG file.

Hopefully this functionality can be exposed in FME soon so we can make our DWG users happier and less confused.

In the meantime, if anyone knows a workaround in FME, please share.

Badge +3

This question has been asked before multiple times. This one contains the best answer from @DaveAtSafe: it is not supported yet

Reply