Tuesday, May 22, 2007


AutoCAD does more than it offers to users

Studying the DXF Reference can reveal some interesting features built in AutoCAD which are not available in the common user interface (in the standard menu/dialog UI).

Did you e.g. know that you can set raster images to display only in aligned plan views? If you have a raster image representing a underlay scale, reference, logo, etc. - maybe it makes no sense to have it displayed in 3D views, perspectives and rotated views. The AutoCAD drawing database (DWG) has a setting for hiding such images in views not aligned with screen (non-plan views).

You can use the following simple LISP macro with the IMGNA (image not aligned) toggle command to demonstrate this functionality. Please note that there is no internal user command or setting to control this feature in AutoCAD.

; Hide image when not aligned with screen
; AutoCADDer - http://autocadder.blogspot.com
; Original LISP rewritten by R.K. McSwain
(defun C:IMGNA (/ e val msg nv)
(setq e (entget (car (entsel "Select an image: "))))
(if (eq 2 (logand 2 (setq val (cdr (assoc 70 e)))))
(setq nv (- val 2) msg "\nThis image will be hidden in non-aligned views")
(setq nv (+ val 2) msg "\nThis image will be displayed even in non-aligned views")
(setq new (subst (cons 70 nv) (assoc 70 e) e))
(entmod new)
(princ msg)

Labels: , ,

<< Home

This page is powered by Blogger. Isn't yours?