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

0 Members and 1 Guest are viewing this topic.

aicr317

  • Guest
Re: about acad plot dialog
« Reply #15 on: January 13, 2010, 12:41:24 PM »
Why not just use vla-plottofile?


sorry i don't know how to use the function of "vla-plottofile",can you give me some Example!

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: about acad plot dialog
« Reply #16 on: January 13, 2010, 12:41:58 PM »
Why not just use vla-plottofile?


sorry i don't know how to use the function of "vla-plottofile",can you give me some Example!

Provided in #9  :-)

aicr317

  • Guest
Re: about acad plot dialog
« Reply #17 on: January 13, 2010, 12:51:21 PM »
Why not just use vla-plottofile?


sorry i don't know how to use the function of "vla-plottofile",can you give me some Example!

Provided in #9  :-)



I TRIED IT , PROBLEM:



HOW TO SET/CONTROL THE "WINDOW OF PLOT AREA" AND "PAPER SIZE" ....AS SO ON ,SUCH AS "PLOT STYLE TABLE"......

aicr317

  • Guest
Re: about acad plot dialog
« Reply #18 on: January 13, 2010, 12:54:31 PM »
TO MANY QUESTIONS ,BECAUSE I WANT TO GET THE INFORMATION AND PUT IT INTO SQL DATABASE AFTER PLOT TO FILE!!!

THE INFORMATION SUCH AS (PLOTTER NAME/PAPER SIZE /PLOT STYLE TABLE/........) AND SOMETHING I DEFUN IT
« Last Edit: January 13, 2010, 12:58:08 PM by aicr317 »

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: about acad plot dialog
« Reply #19 on: January 13, 2010, 12:57:47 PM »
Why not just use vla-plottofile?


sorry i don't know how to use the function of "vla-plottofile",can you give me some Example!

Provided in #9  :-)



I TRIED IT , PROBLEM:



HOW TO SET/CONTROL THE "WINDOW OF PLOT AREA" AND "PAPER SIZE" ....AS SO ON ,SUCH AS "PLOT STYLE TABLE"......

It is all set in the PlotConfiguration object - if a PC3 file is not provided to my example, it will use the current plot configuration.

aicr317

  • Guest
Re: about acad plot dialog
« Reply #20 on: January 13, 2010, 01:08:45 PM »
Why not just use vla-plottofile?


sorry i don't know how to use the function of "vla-plottofile",can you give me some Example!

Provided in #9  :-)



I TRIED IT , PROBLEM:



HOW TO SET/CONTROL THE "WINDOW OF PLOT AREA" AND "PAPER SIZE" ....AS SO ON ,SUCH AS "PLOT STYLE TABLE"......

It is all set in the PlotConfiguration object - if a PC3 file is not provided to my example, it will use the current plot configuration.


ANYWAY,THANK YOU FOR YOUR REPLYING ,I WILL TRY IT TOMORROW,TODAY I AM TOO TIRED, it's AM 2 O'CLOCK(BEIJING TIME),THANK YOU VERY MUCH!!!

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: about acad plot dialog
« Reply #21 on: January 13, 2010, 01:09:31 PM »
You're welcome,

This may give you some inspiration  :-)

Code: [Select]
(defun c:P2F (/ doc itemp SetPS PlottoFile pgset file)
  ;; Lee Mac  ~  13.01.10
  (vl-load-com)

  (defun doc nil
    (setq *doc* (cond (*doc*) ((vla-get-ActiveDocument
                                 (vlax-get-acad-object))))))
 

  (defun itemp (collection item / result)
      (if (not (vl-catch-all-error-p
                 (setq result
                        (vl-catch-all-apply (function vla-item)
                          (list collection item)))))
        result))
 

  (defun SetPS (lay setup)     
    (and (setq lay   (itemp (vla-get-layouts (doc)) lay))
         (setq setup (itemp (vla-get-PlotConfigurations (doc)) setup))
         (not (vla-copyfrom lay setup))))
 
 
  (defun PlottoFile (file pc3 cpy)
    (setq plt (vla-get-plot (doc)))
   
    (and cpy  (eq 'INT (type cpy)) (vla-put-NumberofCopies plt cpy))   
    (eq :vlax-true (vla-plottofile plt file pc3)))


  ;; ----------------------------------------------------

  (if (and (setq pgset (getstring t "\nSpecify Page Setup to Use: "))
           (SetPS (getvar 'CTAB) pgset))
   
    (if (setq file (getfiled "Output File" "" "plt" 1))
     
      (PlottoFile file nil 1))

    (princ "\n** Page Setup Not Found **"))
     
  (princ))
« Last Edit: January 13, 2010, 01:13:40 PM by Lee Mac »

aicr317

  • Guest
Re: about acad plot dialog
« Reply #22 on: January 13, 2010, 01:20:10 PM »
THANK YOU ,IF YOU GOT THE RESULT OF MY POST IN #5 ,PLEASE TELL ME !

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: about acad plot dialog
« Reply #23 on: January 13, 2010, 01:22:26 PM »
THANK YOU ,IF YOU GOT THE RESULT OF MY POST IN #5 ,PLEASE TELL ME !

This should achieve that result, yes.