Lubracali
Guest
Hello, everyone.
I am creating a vba userform that allows me to draw some elements in 2d.
I created a button that allows me to export in pdf using the printer "adobe pdf" created by acrobat pro.
The code is this
The code works, I can print, but there's a problem.
the problem is that in this way I can print, but print what decides autocad, in the format that decides him(I think it is the default printer).
I would need to be able to decide the output format (i.e. the format of the pdf) and which area to print (when selecting printing -> window and selecting the rectangular area).
If someone knew how to indicate me a property or a command other than that used by me that would allow me to do it would make me a great pleasure
I am creating a vba userform that allows me to draw some elements in 2d.
I created a button that allows me to export in pdf using the printer "adobe pdf" created by acrobat pro.
The code is this
Code:
private sub cmdpdf_click()
dim stampa as acadplot
dim nbackgroundplot as long
nbackgroundplot = thisdrawing.getvariable("backgroundplot")
call thisdrawing.setvariable("backgroundplot", 0)
set stampa = thisdrawing.plot
stampa.plottodevice ("adobe pdf")
call thisdrawing.setvariable("backgroundplot", nbackgroundplot)
end sub
the problem is that in this way I can print, but print what decides autocad, in the format that decides him(I think it is the default printer).
I would need to be able to decide the output format (i.e. the format of the pdf) and which area to print (when selecting printing -> window and selecting the rectangular area).
If someone knew how to indicate me a property or a command other than that used by me that would allow me to do it would make me a great pleasure