CAD Forum
Cesky English Deutsch
Login:
 Visitors: 1131 

WWW server of the XANADU company (formerly: CAD Studio) Become a fan of CADforum on Facebook

CAD tip CAD tip # 7171:

Question CAD 
 %  platform  category 
Q - question

How to set a fixed size for a drawing window?

A - answer For renderings, for screen-captures of your drawings, or other similar actions you may need to fix the size of the document window (DWG drawing) in the main AutoCAD application window. To set the window size to a specified number of pixels (width + height) you can use the following simple LISP code (change the size parameters as needed):
;Sets drawing window size
;by XANADU.cz
(vl-load-com)
(setq sizer_actdoc (vla-get-activedocument (vlax-get-acad-object)))
(vla-put-width sizer_actdoc 1000);W=1000px
(vla-put-height sizer_actdoc 800);H=800px
Copy the code via copy/paste, or save it to SIZER.LSP and load it with APPLOAD, or assign it to a new AutoCAD menu icon. The function changes the window size of the current document (even a maximized window).

You can also use the interactive version of SIZER.LSP - see www.xanadu.cz/download

ACAD
100% *  CAD 
20.1.2010    794x  
Comments   Tell a friend
Share tip: Digg it! Del.icio.us Facebook Technorati StumbleUpon
applies to: AutoCAD ·

See also:
Tip 7245:How to load/install a LISP application in AutoCAD?
Tip 6972:How to remove arc segments from Pline?
Tip 6928:AutoCAD reports: error: bad argument type: fixnump:
Tip 6776:How to add a comment to a drawing object?
Tip 6724:Automatically generated picture-legend of drawing blocks.


Back   All CAD Tips All CAD tips&tricks

Convert Civil 3D COGO points to blocks with attributes. « | » PreSave reactor - automatic operations on drawing save.

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings. You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Automatic nesting of 2D parts on rectangular sheets in AutoCAD
AutoNEST 2008 More info


Please use these tips at your own risk.
XANADU (CAD Studio) is not responsible for possible problems that may occur as a result of using any of these tips.