Working with AutoCAD Layouts

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

An AutoCAD Layout allows you to set a view of the AutoCAD model suitable for printing. Layouts often include text and symbols surrounding one or more viewports of the model and are designed in paper space. For a more in-depth explanation of layouts, please see the AutoCAD online documentation.

WIdj-a4Uy3Eru15UofUGBDCAMpWGhfDJL9-jqboyumTfkMd6a4NF2Y21TV1u3k5Cgd1WE8acSt6i7J0T2HniWunxJejOuzBL3aior-St7-2p29EzNjDPGHM-prTGvfFwAFHC_PNH

Example of an AutoCAD layout, showing viewport and surround graphics

FME can currently only add features and viewports to an existing layout in the template file, but not create new layouts.

While the model data is measured in real-world coordinates, paper space is measured in inches or mm on the output page. Thus when we read the paper space along with the model space, the paper space features are clustered tightly around 0,0.

When we add features to the layout, they need to located in and scaled to the paper space coordinates. The layout’s origin will be in in the lower left corner, and the size will be based on the output page size (ie. 8.5” x 11”).
 

Viewports

A viewport is a window on the model data. It will have a center point, height and width measured in page units, but it will also have a center point, height and width of its bounds within model space, measured in the model units.

To create a viewport in FME requires the following attributes:

autocad_entity - set to ‘autocad_viewport’
autocad_space - The name of the Layout to be placed in
autocad_viewport_on - set to ‘Yes’
autocad_viewport_center_point_x, _y, _z - location of viewport center in page units
autocad_viewport_height - height of viewport in page units
autocad_viewport_width - width of viewport in page units
autocad_viewport_view_center_x, _y - location of viewport center in model units
autocad_viewport_custom_scale - scale of the viewport in page units per model unit

If the page units are in inches, and the model units are in meters, a print scale of 1:5000 would work out to an autocad_viewport_custom_scale of:

(meters/inch)/5000 = 39.3701/5000 = 0.00787402

Given the paper space center, height and width, FME’s AutoCAD writer will use the scale to calculate the model space height and width around the view center.
 

Example Workspace

The attached example workspace will convert a Water Geodatabase to AutoCAD, while populating layouts with a surround block and viewport based on a Shape file of tile boundaries. The surround block’s attributes are filled as well, with the layout scale, title, and date.

Make_Viewports.fmwt

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.