via a lisp. Any help would be very welcome.
What we are trying to acheive is a one click print button. Pick the icon and it will send the current drawing to fit to A3 to your Windows default printer.
|
|
|
via a lisp. Any help would be very welcome.
What we are trying to acheive is a one click print button. Pick the icon and it will send the current drawing to fit to A3 to your Windows default printer.
If you can use VBA instead of lisp, take a look at http://jtbworld.blogspot.com/2006/01...using-vba.html
R.K. McSwain | CAD Panacea |
This may get you closer to your goal:
Code:(setq prn "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows" prn (vl-registry-read prn "Device") prn (substr prn 1 (vl-string-search "," prn)))
Last edited by CAB2k; 2006-09-28 at 02:20 PM.
here's what i did to achieve that. I made sure i had the .pc3 file all setup first through the add a plotter wizard in the options dialog box. Then i ran a plot through the normal plot window, and made sure to apply it to the layout. Then run -plot and say yes to the detailed configuration. Since you applied to layout the first time through all the settings should be set according to what you want it to look like, and then just copy and paste all of the info in the < >. Here's what it looks like
(defun plot2436()
(command "-plot" "y" "" "Oce 9400.pc3" "ARCH expand D (24.00 x 36.00 Inches)" "i" "L" "N" "W" "0.000000,0.000000" "36.000000,24.000000" "1:1" "C" "Y" "Pens - 24x36.ctb" "Y" "N" "N" "N" "N" "Y" "Y"))
Hope this helps.
We import a page setup and set it current to perform our one button plot to files, the modification only runs when the title block is located at 0,0 and the layout tab uses the proper naming convention for our plot files. Then we plot using the following options:
The items in red are variables that were defined earlier in the program, however if you select "N" for plot to file the options leave out that line.Code:(command ".-PLOT" "N" ;Detailed plot configuration? [Yes/No] <No>: N "" ;Enter a layout name or [?] <Layout1>: pagesetup ;Enter a page setup name <>: "" ;Enter an output device name or [?] <current>: "y" ;Write the plot to a file [Yes/No] <N>: y file ;Enter file name <maverickengineeringx5405RCp01001-Layout1.PLT>: "y" ;Save changes to page setup [Yes/No]? <N> n "y" ;Proceed with plot [Yes/No] <Y>: ) ;end command
The best way to write something like this is to follow the prompts for (-plot) it will put all the options on the command line
I use functions of DOSLIB from www.mcneel.com to access default printer, get all the printers or set a specific printer as default.Originally Posted by m.f.hacker
Regards,
Abdul Huck
That did the trick. Thank you.Originally Posted by CAB2k