Author Topic: Set page setup current?  (Read 2156 times)

0 Members and 1 Guest are viewing this topic.

KewlToyZ

  • Guest
Set page setup current?
« on: May 22, 2009, 10:51:26 AM »
I am going through a few routines that seem to have stopped working.
I am just trying to figure out if it is a drawing variable causing the problem or something else.
It used to set the full size page setup current, it no longer works?


Code: [Select]
(defun c:r24x36()
(prompt "\nDelete Old Page Setups !!!")
(vl-load-com)
  (vlax-for ps (vla-get-plotconfigurations
  (vla-get-activedocument
  (vlax-get-acad-object)))
  (vla-delete ps)
)

(prompt "\nSetting 24x36 Plot to file Page Setups !!!")
(command "psetupin" "24x36.dwt" "Plot to File Full Size")
(command "psetupin" "24x36.dwt" "Plot to File Half Size")

(prompt "\nSetting default 24x36 full size Page Setup !!!")
(command "-plot" "n" (getvar "CTAB") "Plot to File Full Size" "Plot to File 24x36.pc3" "n" "y" "n")
(princ)
)

KewlToyZ

  • Guest
Re: Set page setup current?
« Reply #1 on: May 22, 2009, 10:59:31 AM »
Hmmm odd behaviour from the pc3 files....
Beginning to suspect the MEP 2010 installation messed up my OS's PC3 editing functions.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Set page setup current?
« Reply #2 on: May 22, 2009, 11:17:19 AM »
See if this makes a difference.
Code: [Select]
(defun c:r24x36 (/ curdwg ps)
  (prompt "\nDelete Old Page Setups !!!")
  (vl-load-com)
  (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object)))
  ;; Call RefreshPlotDeviceInfo before GetPlotDeviceNames
  (vla-RefreshPlotDeviceInfo (vla-get-Layout (vla-get-PaperSpace curdwg)))
  (vlax-for ps (vla-get-Plotconfigurations curdwg)
    (vla-delete ps)
  )

  (prompt "\nSetting 24x36 Plot to file Page Setups !!!")
  (command "psetupin" "24x36.dwt" "Plot to File Full Size")
  (command "psetupin" "24x36.dwt" "Plot to File Half Size")

  (prompt "\nSetting default 24x36 full size Page Setup !!!")
  (command "-plot" "n" (getvar "CTAB") "Plot to File Full Size"
           "Plot to File 24x36.pc3" "n" "y" "n")
  (princ)
)
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.

KewlToyZ

  • Guest
Re: Set page setup current?
« Reply #3 on: May 22, 2009, 12:38:49 PM »
Thanks for throwing me a bone CAB  :-)
I repaired the PC3 files and reset the dwt I was importing from.
I have been testing and using too many environments lately and corrupted the core files somewhere along the way.
I have Windows 7 64 bit on my laptop because I hated Vista home premium so badly, (HP model DV7-1285dx)
tested some items with MEP 2010, ... just too many places things could have gone wrong.  :lol:

I'll try your tweak.
I have a 3 day weekend coming up with the Mrs.
Think I will take some time to debug all of my system this weekend on XP and W7.
I doubt I will look at MEP 2010 for at least a year.
I am also cancelling the MEP 2009 upgrade.
Crashes while publishing where 2007 doesn't.
It amounts to file bugs with their version control issues as near as I can tell.
Not worth the Maintenance costs of installing the software,
reinstalling the DotNet frameworks only to have the bug still happen.

Really makes objectivity or goals difficult to maintain from a systems management perspective.