0 Members and 1 Guest are viewing this topic.
;; Function to delete all user plot set ups(defun C:cxz (/ curdwg pslayout x) (vl-load-com) (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object)) pslayout (vla-get-Layout (vla-get-PaperSpace curdwg)) ) ;_ end of setq ;; Call RefreshPlotDeviceInfo before GetPlotDeviceNames (vla-RefreshPlotDeviceInfo pslayout) (vlax-for x (vla-get-Plotconfigurations curdwg) (vla-delete x) ) ;_ end of vlax-for ) ; End Plot_config_list
(defun C:cxz (/ curdwg pslayout x ; local procedures do-some-stuff ) (vl-load-com) (setq curdwg (vla-get-ActiveDocument (vlax-get-Acad-Object)) pslayout (vla-get-Layout (vla-get-PaperSpace curdwg)) ) ;_ end of setq ;; Call RefreshPlotDeviceInfo before GetPlotDeviceNames (vla-RefreshPlotDeviceInfo pslayout) (vlax-for x (vla-get-Plotconfigurations curdwg) (vla-delete x) ) ;_ end of vlax-for ;; a helper procedure incase you want to add more. ;; this wont work for plot and few other commands. (defun do-some-stuff ( process ) ;; simple command processor; ;; command is issued and waits till ;; user is done. (command process) (command "~") (while (eq (logand (getvar 'CMDACTIVE)) 1) (command PAUSE)) ) ;; set the textfill var to one (1) (setvar 'TEXTFILL 1) ;; let the user insert a block (do-some-stuff "insert"))
;; let the user insert a block (do-some-stuff "insert")
(do-some-stuff "insert" "what i want inserted")
^C^CTEXTFILL;1;-insert;K:/settings/CECEPlotSettings;^C^Cplot;
...... ;; set the textfill var to one (1) (setvar 'TEXTFILL 1) ;; let the user insert a block (command "insert" "K:/settings/CECEPlotSettings")(command)(command "plot"))
^C^C(C:cxz);TEXTFILL;1;-insert;K:/settings/CECEPlotSettings;^C^Cplot;
(C:cxz)