Author Topic: vla-plotconfiguration...  (Read 2850 times)

0 Members and 1 Guest are viewing this topic.

cadman6735

  • Guest
vla-plotconfiguration...
« on: January 31, 2014, 12:55:08 PM »
Hi all,

I am trying to understand how to modify (vla-plotcofiguration) where I can set all plot configurations at once, including modelspace to a desired setting.

so if I only wanted to change the "paperunits" to 1 or..

change only the "PageSetup name" to whatever...

I don't LISP enough and seem to be stuck...

thanks


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: vla-plotconfiguration...
« Reply #1 on: January 31, 2014, 03:24:13 PM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

cadman6735

  • Guest
Re: vla-plotconfiguration...
« Reply #2 on: February 03, 2014, 10:46:35 AM »
Hi CAB, thank you very much for your link

I am not trying to or wanting to import a page setup from an existing "template" file, I have a macro for this, what I am looking to do is preset one setting in the plot dialog box of my own choosing, one at a time, I am able to do it for "activeLayout" but not for all "Layouts" at once, including the Model Space.

Why do I want to do this?  Only to add a new tool to my collection of tools and to add an extra bit of control for one off situations.  but mainly I can't figure out how to do it and I always seem to be starting from scratch with my LISP, I hit it hard and heavy for a week or two then 6 months later I am back to square one and I am frustrated and mind blocked.

Here is a basic example of where I am trying to get to:
Code: [Select]
(defun c:test ( / )(vl-load-com)

  (setq acDoc (vla-get-activeDocument (vlax-get-acad-object))
  acLayouts (vla-get-Layouts acDoc)
  )

  (vlax-for x acLayouts
    (vla-put-paperunits acLayouts 1)
  )

(princ)
)

Thanks again

ronjonp

  • Needs a day job
  • Posts: 7527
Re: vla-plotconfiguration...
« Reply #3 on: February 03, 2014, 10:53:09 AM »
Try this:
Code: [Select]
(defun c:test (/)
  (vl-load-com)
  (vlax-for layout (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))
    (vla-put-paperunits layout 1)
  )
  (princ)
)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cadman6735

  • Guest
Re: vla-plotconfiguration...
« Reply #4 on: February 03, 2014, 11:24:42 AM »
your kidding me!!!!....

I was so close....  and banging my head...  Thanks RonJon  (I saw your code and was thinking what's the difference)

I had this:
Code: [Select]
(vla-put-paperunits acLayouts 1)
and I need this:
Code: [Select]
(vla-put-paperunits x 1)

such a simple oversight

THANK YOU

ronjonp

  • Needs a day job
  • Posts: 7527
Re: vla-plotconfiguration...
« Reply #5 on: February 03, 2014, 11:26:11 AM »
your kidding me!!!!....

I was so close....  and banging my head...  Thanks RonJon  (I saw your code and was thinking what's the difference)

I had this:
Code: [Select]
(vla-put-paperunits acLayouts 1)
and I need this:
Code: [Select]
(vla-put-paperunits x 1)

such a simple oversight

THANK YOU
;D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC