Author Topic: about acad plot dialog  (Read 5656 times)

0 Members and 1 Guest are viewing this topic.

aicr317

  • Guest
about acad plot dialog
« on: January 13, 2010, 07:04:38 AM »
look at this picture

file name and location "c:\drawing1-model.plt"

how can i get this values with lisp???and how to input this values ???and how to set the "plot to file" is normal used???
« Last Edit: January 13, 2010, 07:10:28 AM by aicr317 »

Chris

  • Swamp Rat
  • Posts: 548
Re: about acad plot dialog
« Reply #1 on: January 13, 2010, 07:58:43 AM »
I dont know how to get the plot dialog to default, but what I did to force the name of the file I wanted when plotting to file was to redefine the plot command so that if all our standard conditions are met, the file will automatically plot to file with the proper name already associated with the plot file. Of course, there is also an option to cancel the autoplot and bring up the standard plot dialog.
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: about acad plot dialog
« Reply #2 on: January 13, 2010, 09:26:54 AM »
What does this return?
Code: [Select]
(vl-registry-read
   (strcat "HKEY_CURRENT_USER\\" (vlax-product-key)
           "\\Profiles\\" (getvar "cprofile")
           "\\Dialogs\\Plot\\")"PlotToFileBrowseDir"
   )
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: about acad plot dialog
« Reply #3 on: January 13, 2010, 09:33:40 AM »
I found this:
Code: [Select]
; Jason Piercey . 2003
; check or uncheck the 'save changes to layout'
; toggle box found at the top left corner of the
; plot dialog box
; [arg] - any value
; if a non nil value is supplied changes are
; saved otherwise changes are not saved.
; (SaveChangeToLayout nil) turns it off
; (SaveChangeToLayout T) turns it on
; return: T
(defun saveChangeToLayout (arg)
 (and
  (vl-registry-write
   (strcat "HKEY_CURRENT_USER\\" (vlax-product-key)
           "\\Profiles\\" (getvar "cprofile")
           "\\Dialogs\\Plot")
   "SaveChangeToLayout"
   (if arg "true" "false")
   )
  )
 )
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.

aicr317

  • Guest
Re: about acad plot dialog
« Reply #4 on: January 13, 2010, 11:33:47 AM »
What does this return?
Code: [Select]
(vl-registry-read
   (strcat "HKEY_CURRENT_USER\\" (vlax-product-key)
           "\\Profiles\\" (getvar "cprofile")
           "\\Dialogs\\Plot\\")"PlotToFileBrowseDir"
   )

nice work!!!its important to me!!!but i also want to know how to control the value of "plot to file",hopes its always be used or Selected!

aicr317

  • Guest
Re: about acad plot dialog
« Reply #5 on: January 13, 2010, 11:40:00 AM »
how to control it!!!

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: about acad plot dialog
« Reply #6 on: January 13, 2010, 11:45:39 AM »
Why not just use vla-plottofile?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: about acad plot dialog
« Reply #7 on: January 13, 2010, 11:52:22 AM »
Lee,
I get the impression that the OP wants to preset the dialog box for the user but not omit the dialog box.
I could be wrong in my assumption though. 8-)
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: about acad plot dialog
« Reply #8 on: January 13, 2010, 11:54:26 AM »
aicr317,
See the second lisp I posted & use this to check the box.
Code: [Select]
(SaveChangeToLayout T) ;turns it on
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.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: about acad plot dialog
« Reply #9 on: January 13, 2010, 11:54:41 AM »
Lee,
I get the impression that the OP wants to preset the dialog box for the user but not omit the dialog box.
I could be wrong in my assumption though. 8-)


Ok, Thanks Alan, for the benefit of the doubt:

Code: [Select]
;; Arguments:
;; file  = filename to Plot to     [str]
;; pc3   = PC3 file to use    [opt][str]
;; cpy   = Number of Copies   [opt][int]

(defun PlottoFile (file pc3 cpy)
  (setq plt (vla-get-plot
              (vla-get-ActiveDocument
                (vlax-get-acad-object))))

  (and cpy  (eq 'INT (type cpy)) (vla-put-NumberofCopies plt cpy))
 
  (eq :vlax-true (vla-plottofile plt file pc3)))

Perhaps something like that may suffice
« Last Edit: January 13, 2010, 12:43:50 PM by Lee Mac »

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: about acad plot dialog
« Reply #10 on: January 13, 2010, 11:58:49 AM »
aicr317,
See the second lisp I posted & use this to check the box.
Code: [Select]
(SaveChangeToLayout T) ;turns it on

FYI,

In 2010 the registry key is:

Code: [Select]
HKEY_CURRENT_USER\\<Product Key> \\Profiles\\<Current Profile>\\Dialogs\\Plot [color=red]Stamp[/color]

Value Name:  "SaveChangeToLayout"

Also, Are you sure the OP wants this setting? I thought it was the "Plot to File" setting he/she was after?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: about acad plot dialog
« Reply #11 on: January 13, 2010, 12:15:15 PM »
Lee your quite right.
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.

aicr317

  • Guest
Re: about acad plot dialog
« Reply #12 on: January 13, 2010, 12:27:05 PM »
cab,i am afraid there is still something wrong with your second lisp,

aicr317

  • Guest
Re: about acad plot dialog
« Reply #13 on: January 13, 2010, 12:33:00 PM »
I found this:
Code: [Select]
; Jason Piercey . 2003
; check or uncheck the 'save changes to layout'
; toggle box found at the top left corner of the
; plot dialog box
; [arg] - any value
; if a non nil value is supplied changes are
; saved otherwise changes are not saved.
; (SaveChangeToLayout nil) turns it off
; (SaveChangeToLayout T) turns it on
; return: T
(defun saveChangeToLayout (arg)
 (and
  (vl-registry-write
   (strcat "HKEY_CURRENT_USER\\" (vlax-product-key)
           "\\Profiles\\" (getvar "cprofile")
           "\\Dialogs\\Plot")
   "SaveChangeToLayout"
   (if arg "true" "false")
   )
  )
 )


what does it return???i done like that and found nothing had been changed!

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: about acad plot dialog
« Reply #14 on: January 13, 2010, 12:34:12 PM »
what does it return???i done like that and not found something had been changed!

It sets the toggle for Save Changes to Layout.

What is your answer to my post in #6?