Jump to content

change layout settings...help


leonucadomi

Recommended Posts

hello:

How can I change the layout configuration from lsp?

 

change JPG to IMPRIMIR EN A3,  without opening the pagesetup window

I need to change that in many files.

 

Is there a variable that changes it from lsp?

 

 

 

image.png.3127fd186cc179f91befce27594f196a.png

Link to comment
Share on other sites

@leonucadomi Maybe This? Not able to test it without a drawing. Use command SETCURPSETUP to change the Page Setup of the current layout.

You can also remove the (if (= lay (getvar "ctab")) and the end parenthesis, leaving just (putpagesetup lay "IMPRIMIR EN A3") to apply to all layouts.

; Jason Piercey . May 16th, 2003
; assign a pagesetup to a layout
; [layout] - string, layout name
; [setup] - string, pagesetup to assign
; return: T or nil
(defun putPagesetup (layout setup / layouts plots)
   
   (defun item-p (collection item)
      (if
         (not
            (vl-catch-all-error-p
               (vl-catch-all-apply
                  '(lambda () (setq item (vla-item collection item)))
               )
            )
         )
         item
      )
   )

   (and
      (or *acad* (setq *acad* (vlax-get-acad-object)))
      (or *doc* (setq *doc* (vla-get-activedocument *acad*)))
      (setq layouts (vla-get-layouts *doc*))
      (setq plots (vla-get-plotconfigurations *doc*))
      (setq layout (item-p layouts layout))
      (setq setup (item-p plots setup))
      (not (vla-copyfrom layout setup))
   )
)

(defun c:SetCurPsetup (/ lay)
  (foreach lay (layoutlist)
    (if (= lay (getvar "ctab"))(putPagesetup lay "IMPRIMIR EN A3"))
  )
  (princ)
)

 

There is also this:

http://www.theswamp.org/index.php?topic=38005.msg430212#msg430212

Edited by pkenewell
  • Thanks 1
Link to comment
Share on other sites

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