Jump to content

Recommended Posts

Posted

I needed to set PSLTSCALE to 0 in all the layouts of a drawing then I found:

 

(foreach lay (layoutlist)(command "_LAYOUT" "_Set" lay "PSLTSCALE" 0))

Which took an hour to finish on my DWG (has many layouts) and I'm under the impression that autocad actually opened each layout, regenerated, applied PSLTSCALE=0, regenerated again and so on.

Is there a way to speed up things like apply PSLTSCALE=0 with regen disabled,

than when all done do REGENALL.

 

I've also found this:

 

; PS0 definition
(defun c:PS0()
 (foreach lay (layoutlist)
   (command "_LAYOUT" "_Set" lay "PSLTSCALE" 0)
   (command "_pspace")
   (command "_zoom" "extents")
 );end foreach
);endPS0 (c:PS0)

I do not understand why

(command "_zoom" "extents")

was used.

 

Another thing I'm not sure about is what happens when one layout has multiple viewports, with both ways of changing PSLTSCALE is _pspace recursive in all viewports io an layout, by itself, or it just changes first viewport for "foreach" is used for layout, but not viewport in layout.

 

One more thin to add to this lsp would be reloading of all linetypes at the end.

Posted

If you can find how the effect of said system variable is set into layout's associated list, you may create a selection set with all layouts from drawing and parse this one instead to adjust the associated lists.

(ssget "_X" '((0 . "VIEWPORT")))

Posted

i'm afraid that i'm not smart enough...

or maybe i should just catch some sleep... but you are absolutely right.

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...