AutoLISP: Set PSLTSCALE for All Viewports

http://wp.me/p1aURt-jN

The system variable PSLTSCALE (Paper Space LineType SCALE) has been mentioned [here] so this LISP routine is a great example of automating the process of changing this setting in all of your viewports for you.

Here’s how:

  • PS0 <enter> to start (note: PS zero, not o “oh”)

That’s it.

; Sets the Paper Space LTScale (PSLTSCALE) to zero
(defun c:PS0()
(foreach lay (layoutlist)
(command "_LAYOUT" "_Set" lay "PSLTSCALE" 0)
(command "_pspace")
(command "_zoom" "extents")
(command "REGENALL")
);end foreach
(princ)
);endPS0 (c:PS0)
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, AutoLISP: Modify, Layout, Modifying, Paper Space, Viewports. Bookmark the permalink.

One Response to AutoLISP: Set PSLTSCALE for All Viewports

  1. Larry says:

    I am a new instructor for a community college and I am grading midterms. We are using Autocad 2013. I am finding that some of my students viewports that were created in paperspace are not able to be edited ( change or set scale in properties) and the cursor is stuck inside the active viewport. When I tried to duplicated the problem on their files by creating another viewport sometimes they work fine and are always able to be edited and other times I have the same problem as they have. It is almost like the viewport turns into a polyline. Any Ideas, thoughts etc.?

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