• このフォーラムは、www.cad3d.it/forum1 - イタリアのデザインコミュニティの機械翻訳です。いくつかの用語は正しく翻訳されていません。

デフォルトプロッタを変更する

  • Thread starter Thread starter arri
  • Start date Start date

arri

Guest
fonte

;;; by jimmy bergmark
;;; copyright (c) 1997-2006 jtb world, all rights reserved
;;; website: www.jtbworld.com
;;; e-mail: [email protected]
;;;
;;; plotdevicesfunctions.lsp
;;;
;;; 2003-01-09 more functions added
;;; 2006-07-30 make it possible to add this lisp into your acaddoc.lsp
;;; 2006-12-15 corrected a minor bug
;;;

(vl-load-com)

(defun actlay ()
(vla-get-activelayout
(vla-get-activedocument
(vlax-get-acad-object)
)
)
)

; return the plotter configuration name
(defun getactiveplotdevice ()
(vla-get-configname
(actlay)
)
)

; return the plot style table name
(defun getactivestylesheet ()
(vla-get-stylesheet
(actlay)
)
)

; force the plotter configuration to something
(defun putactiveplotdevice (plotdevicename)
(vla-put-configname
(actlay)
plotdevicename
)
)

; force the plot style table to something
(defun putactivestylesheet (stylesheetname)
(vla-put-stylesheet
(actlay)
stylesheetname
)
)

; return a list of all plotter configurations
(defun plotdevicenameslist ()
(vla-refreshplotdeviceinfo (actlay))
(vlax-safearray->list
(vlax-variant-value
(vla-getplotdevicenames
(actlay)
)
)
)
)

; return a list of all plot style tables
(defun plotstyletablenameslist ()
(vla-refreshplotdeviceinfo (actlay))
(vlax-safearray->list
(vlax-variant-value
(vla-getplotstyletablenames
(actlay)
)
)
)
)

; if the saved plotter configuration doesn't exist set it to none
(defun putactiveplotdevicetononeifnotexist ()
(if (not (member (getactiveplotdevice) (plotdevicenameslist)))
(putactiveplotdevice "none")
)
)

; if the saved plot style table doesn't exist set it to none
(defun putactivestylesheettononeifnotexist ()
(if (not
(member (getactivestylesheet) (plotstyletablenameslist))
)
(putactivestylesheet "")
)
)

; change the plotter configuration "companystandard.pc3" to your need
(defun putactiveplotdevicetocompanystandardifnotexist ()
(if (not (member (getactiveplotdevice) (plotdevicenameslist)))
(putactiveplotdevice "companystandard.pc3")
)
)

; change the plot style table "companystandard-a3-bw.ctb" to your need
(defun putactivestylesheettocompanystandardifnotexist ()
(if (not
(member (getactivestylesheet) (plotstyletablenameslist))
)
(putactivestylesheet "companystandard-a3-bw.ctb")
)
)

; change the plotter configuration to the default one set in the options
; if the active plot device does not exist
(defun putactiveplotdevicetodefaultifnotexistornone ()
(if (or (not (member (getactiveplotdevice) (plotdevicenameslist)))
(= (getactiveplotdevice) "none")
)
(if (= (vla-get-uselastplotsettings
(vla-get-output
(vla-get-preferences (vlax-get-acad-object))
)
)
:vlax-true
)
(putactiveplotdevice
(getenv "general\\mruconfig")
)
(putactiveplotdevice
(vla-get-defaultoutputdevice
(vla-get-output
(vla-get-preferences (vlax-get-acad-object))
)
)
)
)
)
)

; change the plot style table to the default one set in the options
; if the active plot style table does not exist
(defun putactivestylesheettodefaultifnotexistornone ()
(if (or (not
(member (getactivestylesheet) (plotstyletablenameslist))
)
(= (getactivestylesheet) "")
)
(putactivestylesheet
(vla-get-defaultplotstyletable
(vla-get-output
(vla-get-preferences (vlax-get-acad-object))
)
)
)
)
)

; customize this as you want
; either force the plot device and/or the style sheet to something
; or only if the saved setting doesn't exist.

; if the plot device (printer, plotter or pc3 file) saved in the drawing
; and that will be used when printing does not exist or is set to none
; set it instead to your default plotter/printer
(putactiveplotdevicetodefaultifnotexistornone)

; if the plot style table saved in the drawing
; and that will be used when printing does not exist or is set to none
; set it instead to your default plot style table
(putactivestylesheettodefaultifnotexistornone)

; these below can be used if you want them set to none if they don't exists
;(putactiveplotdevicetononeifnotexist)
;(putactivestylesheettononeifnotexist)

; if you want to enforce another company standard you can
; activate and change in these functions
;(putactiveplotdevicetocompanystandardifnotexist)
;(putactivestylesheettocompanystandardifnotexist)

(princ)
 

Forum statistics

Threads
46,674
Messages
380,976
Members
2
Latest member
loop80
このフォーラムは、www.cad3d.it/forum1 - イタリアのデザインコミュニティの機械翻訳です。いくつかの用語は正しく翻訳されていません。

Members online

No members online now.
Back
Top