Jump to content

Recommended Posts

Posted

Good Evening:

 

I ran into this problem tonight. The PSLTSCALE on some of the tabs were set to 1. Other tabs were set to 0. Is there a Lisp or command to set all PSLTSCALE to 0 universally on all my tabs. It took way too much time tonight going through 15 tabs setting all of them to 0.

Posted (edited)

modified lisp from here

 

; Sets the Paper Space LTScale (PSLTSCALE) to zero
(defun c:PS0(/ tab)
  (setq tab (getvar 'ctab))
  (setvar 'cmdecho 0)
  (foreach lay (layoutlist)
    (command "_LAYOUT" "_Set" lay "PSLTSCALE" 0)
  )
  (setvar 'ctab tab)
  (setvar 'cmdecho 1)
  (princ)
)

 

Edited by mhupp
Posted (edited)

Good Morning:

 

Thank you so Much I really appreciate it! 

 

I tried out the lisp. It works but it cycles through all my tabs 2 times. Is there a way to make it not cycle through everything twice? It has taken half an hour  to cycle through the 15 page tabs. 

Edited by Efeezy
Posted (edited)

It remembers the tab your on so when its done cycling it goes back to that tab. Are you running the command twice?

HALF HOUR???????? It take me like half a second to run thought 12 tabs.

 

Thought maybe we could do some visual lisp variable update without having to change to the tab but that seems to be a no go aswell.

 

 

Quote

Keith™

 

Well, I looked at it over and over again and it seems that the variable data is stored in the Layout object list, but while you can change it directly, it will not become active unless you switch the layout... now how silly is that. The DXF code is automatically updated to the value of PSLTSCALE only when the layout is changed, so if you changed the layout directly via lisp, the PSLTSCALE will still be the other setting until you switched the layout, at which point the layout is updated to the value of PSLTSCALE which defeats the purpose all together. There may not be a simple answer, but I have not yet given up hope.

 

Edited by mhupp
Posted (edited)
On 2/1/2022 at 9:39 AM, Efeezy said:

Good Morning:

 

Thank you so Much I really appreciate it! 

 

I tried out the lisp. It works but it cycles through all my tabs 2 times. Is there a way to make it not cycle through everything twice? It has taken half an hour  to cycle through the 15 page tabs. 

Freeze all xrefs and that will help with speed considerably.

(foreach l (layoutlist) (setvar 'ctab l) (setvar 'psltscale 0))

Or you could turn of all viewports then turn them back on after.

Edited by ronjonp
Posted

I needed to unload the xrefs then it too a few seconds. Thank you everyone for your help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...