The code below is what i have to select a plotter and paper size, is working fine,
but when transfer to a variable it turn nil....(setq Plotter_name (vla-put-ConfigName plotCfg "Oce TDS750 11th Floor.pc3"))
any suggestion how to acomplish this...?
I have the following code to select the plotter and paper size
;; Set the plot device
(vla-put-ConfigName plotCfg "Oce TDS750 11th Floor.pc3")
;; Set the paper size
(vla-put-CanonicalMediaName plotCfg "Oce D+ 24x36 in (Landscape)")
Solved! Go to Solution.
You can 'store' the 2 arguments into a variable:
(setq ConfigDL (list plotCfg "Oce TDS750 11th Floor.pc3"))
and then extract the 2 values for something.
You can make a function to do each process, ie
; Set the plot device
(defun C:DevNam ()
(vla-put-ConfigName plotCfg "Oce TDS750 11th Floor.pc3")
(princ "\n Set the plot device'd ") (princ) )
; Set the paper size
(defun C:PapSiz ()
(vla-put-CanonicalMediaName plotCfg "Oce D+ 24x36 in (Landscape)")
(princ "\n Set the paper size 'd ") (princ) )
Probably.
The existing variable, 'plotcfg,' must have some valid contents, of course.
And other forms to do the same exist.
The function call (vla-put... ) offers some clues about what is happening. It "puts" (sets) the property - in this case, ConfigName. If you want the value of that property, you "get" the property using (vla-get...). This can be done with any vla-object which has properties. The actual properties vary depending on what the object is ie. a line won't have a plotter configuration name, and some properties are read-only ie. you can "get" but not "put".
@Anonymous wrote:
The code below is what i have to select a plotter and paper size, is working fine,but when transfer to a variable it turn nil....(setq Plotter_name (vla-put-ConfigName plotCfg "Oce TDS750 11th Floor.pc3"))
any suggestion how to acomplish this...?
With
(setq Plotter_name (vla-put-ConfigName plotCfg "Oce TDS750 11th Floor.pc3"))
you are setting the variable Plotter_name with the return from the vla-put-ConfigName function, that 'will be nil.
If I understood correctly, you can store the ConfigName in the Plotter_name variable previously
(setq Plotter_name "Oce TDS750 11th Floor.pc3")
and then set the ConfigName with the stored Plotter_name
(vla-put-ConfigName plotCfg Plotter_name)
HTH
Henrique