Has anyone a technique that can check the current plotter name for the current tab and assign it to a variable? i.e. can it be assigned to a variable to check if if equals "myplotter1". The next step - is there a technique to change the plotter name to "myplotter2.pc3".
I have partially done the latter part of this in the past using the -plot command line to ASSIGN a new plotter but I would really like to only run the routine if it really needs to. Thanks for any help.
@Anonymous wrote:
Has anyone a technique that can check the current plotter name for the current tab and assign it to a variable? i.e. can it be assigned to a variable to check if if equals "myplotter1". The next step - is there a technique to change the plotter name to "myplotter2.pc3".
I have partially done the latter part of this in the past using the -plot command line to ASSIGN a new plotter but I would really like to only run the routine if it really needs to. Thanks for any help.
Try
(setq AObj (vlax-get-Acad-Object) ADoc (vla-get-ActiveDocument AObj) ALyt (vla-get-ActiveLayout ADoc) Plt (vla-get-Configname ALyt) );; setq (if (= "myplotter1" Plt) (vla-Put-Configname ALyt "myplotter2.pc3") );; if
HTH
Henrique
Thanks for your help once again :). The section of code (vlax-get-Configname ALyt) does not work - it produces and error. I have loaded (vl-load-com).
I cannot find the documentation for vla-get functions (or any vla stuff in fact) in the help system - can you point me int he right direction please. Thanks
@Anonymous wrote:
Thanks for your help once again :). The section of code (vlax-get-Configname ALyt) does not work - it produces and error. I have loaded (vl-load-com).
I cannot find the documentation for vla-get functions (or any vla stuff in fact) in the help system - can you point me int he right direction please. Thanks
You're welcome, George.
(vlax-get-Configname ALyt) is (vla-get-Configname ALyt) and should work...
For the ActiveX Help, try at the VLIDE help, at the ActiveX & VBA Reference... online
HTH
Henrique
George,
maybe this way it will be easier to understand,
(defun c:test (/ ACADDOCUMENT ACADOBJECT ACTIVELAYT ACTIVEPLT) (vl-load-com) (setq AcadObject (vlax-get-acad-object)) (setq AcadDocument (vlax-get-property AcadObject 'ActiveDocument)) (setq ActiveLayt (vlax-get-property AcadDocument 'ActiveLayout)) (setq ActivePlt (vlax-get-property ActiveLayt 'Configname)) (if (= "myplotter1" ActivePlt) (vlax-put-property ActiveLayt 'Configname "myplotter2.pc3") );; if (princ) )
Henrique
Hi again,
I"m back on my project - but it still doesn't work for me - the error show below
Command: TEST
; error: ActiveX Server returned an error: Error loading type library/DLL
george.drayton wrote:
; error: ActiveX Server returned an error: Error loading type library/DLL
Hi George,
try to copy/paste
(vl-load-com)
to your command line, what is the message that you receive?
AutoCAD version?
Henrique
I ran your Test routine which included (vl-load-com) and got the error message Thanks H
hi H,
I reinstalled and now when I run the line (setq ActivePlt (vlax-get-property ActiveLayt 'Configname)) it returns the existing plotter name and no error messages. thanks for the idea!! rgds
George