PeterPan9720 Posted May 25, 2010 Posted May 25, 2010 Hi to everybody, I saw a lot of posts on similar arguments but until now I been not able to solve this issue. I have an electrical dwg contain 100-150 layers, every time I have to plot it's an hard job. Switch off all layers except the layer 0, plot to pdf, give the file name to pdf and store it in a dir, when all layers has been plotted I have to merge all single pdf to one unique pdf file, sorting again the layer name (single pdf file). Until now I was able to create a VBA macro which give me a list of all layers into dwg file, I'm able to put a specific layer ON or OFF (not in automatic mode). I searched also for API tied with adobe acrobat distiller in order to give the file name automatically from the macro running with AUtocad, but this is an hard job and needs programming knowledge higher than mine. Pls Help Me. Quote
Pablo Ferral Posted May 25, 2010 Posted May 25, 2010 I don't understand why you would create a drawing with 150 Layers, and then turn them all off before you plot ?! Could you clarify your process a little more... Quote
alanjt Posted May 25, 2010 Posted May 25, 2010 I don't understand why you would create a drawing with 150 Layers, and then turn them all off before you plot ?! Could you clarify your process a little more... Clear as mud, come on man! Quote
PeterPan9720 Posted May 25, 2010 Author Posted May 25, 2010 I don't understand why you would create a drawing with 150 Layers, and then turn them all off before you plot ?! Could you clarify your process a little more... I'll try to explain more in detail 1) I have a single file DWG with more than 100 layers, all in the same model space window. 2) Each single layer is a sheet of an electrical drawing. 3) the final document must be a single PDF file. Actually the "manual" procedure to obtain a PDF is to 1) plot each single layer to a PDF file, by switching on, plot and again off each single layer. 2) finally after n times of the same operation with all layers you have the same number of single file pdf. 3) In order to have a single PDF as the single dwg you have to merge the PDF (one for each layer) sorting before each file to merge in the same way as the dwg is. 4) finally after the PDF merge operation the result is a single PDF file which contain several pages. 5) after all above operation you will have to visit a good clinic for your mind !. I'm searching for a "macro" to do this automatically, but seems that the problem is the Adobe File Name sending to the windows that appears when you plot to a file. I hope this could help you. Thank you Quote
Lee Mac Posted May 25, 2010 Posted May 25, 2010 Depending on the PDF plotter you use, if you go to control panel > Printers and check the properties of the PDF printer, I believe you can suppress the filename prompt. Quote
alanjt Posted May 25, 2010 Posted May 25, 2010 Depending on the PDF plotter you use, if you go to control panel > Printers and check the properties of the PDF printer, I believe you can suppress the filename prompt. I know you can with Adobe. God I miss having access to the full version. Stupid economy. Quote
PeterPan9720 Posted May 25, 2010 Author Posted May 25, 2010 Depending on the PDF plotter you use, if you go to control panel > Printers and check the properties of the PDF printer, I believe you can suppress the filename prompt. Thank you I'll check, but in this way your previous plot will be overwritten by the new. Quote
alanjt Posted May 25, 2010 Posted May 25, 2010 Thank you I'll check, but in this way your previous plot will be overwritten by the new. If this option exists, there's another option to prompt if file exists. Quote
PeterPan9720 Posted May 25, 2010 Author Posted May 25, 2010 If this option exists, there's another option to prompt if file exists. Thank you for your answer but the scope of the "automatism" is to avoid ask any keyb input I know that some VBA use a function that send key like as you are typing it Quote
Lee Mac Posted May 25, 2010 Posted May 25, 2010 I know that some VBA use a function that send key like as you are typing it An example using SendKeys (function repeats last command): (defun RepeatLastCommand ( / WSH ) (vl-load-com) (setq WSH (vlax-create-object "WScript.Shell")) (repeat 2 (vlax-invoke WSH 'SendKeys "{UP}")) (vlax-invoke WSH 'SendKeys "~") (vlax-release-object WSH) (princ) ) Quote
PeterPan9720 Posted May 26, 2010 Author Posted May 26, 2010 An example using SendKeys (function repeats last command): (defun RepeatLastCommand ( / WSH ) (vl-load-com) (setq WSH (vlax-create-object "WScript.Shell")) (repeat 2 (vlax-invoke WSH 'SendKeys "{UP}")) (vlax-invoke WSH 'SendKeys "~") (vlax-release-object WSH) (princ) ) Thank you for your answer, but with this you are still inside the Autocad environmental, I have to send key to an external windows that is the file name request from pdf software, and as I explained before if I have to write anytime the filename for each layer to plot, the purpose of the macro becomes useless. Thank you every body for the support Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.