AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN


Model Tab

Have you ever wanted to want to view information about the Model tab or a Layout tab; for example, such as the current output device and paper size. 

The information for layout settings is now stored in the drawing dictionary. 
Following is an example of how you would access the entity information for the Model tab in AutoLISP.

;;Begining of Sample code

(setq layList (dictsearch (namedobjdict) "ACAD_LAYOUT"))
(setq Index 0)
(while (and (/= (cdr (nth Index layList)) "Model")
(/= (nth Index layList) nil))
(setq Index (+ Index 1))
(if (nth (+ Index 1) layList)
(setq modelList (entget (cdr (nth (+ Index 1) layList))))

;;End of Sample Code

This code sets the "modelList" value equal to the entity information for the Model tab as they are stored in the drawing dictionary. After running this routine, type !modelList on the command line and press ENTER. The contents of modelList will be displayed on the command line.

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website