AutoLISP: Find Dodgy Dimensions

Keeping this whole “Dodgy Dimensions” theme going…. Here’s another routine that you can use to find dimensions that have had their value altered.

It will simply turn the “dodgy” dimension text green, thus distinguishing it from the correct dimensions.

If your dimensions happen to be green already, alter the color in the code to distinguish the “dodgy” dims in your drawings.

Here’s how:

  • FINDDODGYDIMS <enter> to start

That’s it, The routine will do the rest.

To alter the color back to normal (after correcting the wrong dimension value of course…). The color value is found in the properties palette where the dimension was altered in the first place.

(defun c:FindDodgyDims ( / ss ) (vl-load-com)

(if (setq ss (ssget "_X" '((0 . "*DIMENSION") (1 . "*?*"))))

(

(lambda ( i / e )

(while (setq e (ssname ss (setq i (1+ i))))

(vla-put-TextColor (vlax-ename->vla-object e) acgreen)

)

)

-1

)

)

(princ)

)
Advertisements

About AutoCAD Tips

This blog serves as a knowledge base for myself (and anyone else) so that I can reference tips & tricks that I have learned and also refer others to it as well. I hope that this blog helps you learn at least one tip to make your drafting/design experience better.
This entry was posted in AutoLISP, Dimensions, Modifying. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s