Landscape and Portrait orientation getting and setting

Top  Previous  Next

Programatically you can get and set the orientation of a drawing document like this:

 

   CComPtr<Sheet> pSheet ;

   ...

   ...

   ...

 

   PageOrientationTypeEnum Orientation;

   pSheet->get_Orientation(&Orientation);

 

   pSheet->put_Orientation(kPortraitPageOrientation);

 

/*

   these are the other enum values:

   kDefaultPageOrientation

   kLandscapePageOrientation

*/

 

 

The coordinate system within a sheet does not change, 0,0 bottom left. See also adding a sheet to a drawing.

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)