CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
New CADforum look launched.
Over 1.082.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 7171:

Question

CAD 
 %  platform  category 
A
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 CADstudio.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 Download

ACAD
100% *CAD
20.1.2010    16943×  
applies to: AutoCAD ·

See also:
Tip 14359:Automatic macro execution when opening a CAD file (AutoCAD, Inventor, Max, PowerMill)
Tip 14328:How to verify entitlement of an application from Autodesk Apps using LISP?
Tip 14268:How to set the background mask color to BYLAYER?
Tip 14163:How to select DWG texts containing a certain number of characters?
Tip 14063:How to get week day and week number from a given date.


Back    All CAD Tips



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, or donating via PayPal (see above). 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
  



Featuring:
Increase your productivity with our set of add-on functions for AutoCAD Civil 3D
CADstudio Civil Tools More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist