Plotting problem

Plotting problem

btmsoftware
Advocate Advocate
485 Views
3 Replies
Message 1 of 4

Plotting problem

btmsoftware
Advocate
Advocate
Hi there,

Here is the story.

I have PDFCreator installed on my AutoCAD (2008) machine.
I open the file C:\Program Files\AutoCAD 2008\Sample\Sheet
Sets\Architectural\T-01.dwg
If, in the Title Sheet Layout, I Open the Plot dialogue box , the paper selected is ARCH D (36.00 x 24.00 inches) as shown in image1.gif

Still in the user interface, I select PDFCreator as the plotter.
Automatically, as AutoCAD detects a form in PDFCreator with the same sizes, it changes the paper to ARCH D as shown in image2.gif

So far so good.

I cancel the changes and close the user interface.

Now. I have a VBA macro that does the same manipulation with:
Dim oLayout As AcadLayout

Set oLayout = ActiveDocument.ActiveLayout
oLayout.RefreshPlotDeviceInfo
oLayout.ConfigName = "PDFCreator"

and that's where it hits the fan

When I regen my layout or display the user interface, the paper sizes has been changed to Letter, which is my default for the PDFCreator driver as shown in image3.gif and therefore, when I plot, I get the wrong sizes

I tried to do a RefreshPlotDeviceInfo again after setting the ConfigName, I tried to do a regen, after, before, before and after

All to no avail

Anybody has an idea ?

PS: All images are in the attached Zip file
0 Likes
486 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I name all my plot configurations. Once they are named you can call them in
code like in the lines below. Your "Image1" showed that you had at least one
named plot configuration, "DWF6_ARCHD_LAND". You can set all the plot
preferences in the plot dialog box then click the "Add" button and give it
name. It saves ALL of the settings that are active. Set it and forget it
Users can pick the desired plot from the list with no fuss. You can also set
the plot preferences in code and also add the named plot configurations in
code.

'ThisDrawing.ActiveLayout.CopyFrom
ThisDrawing.PlotConfigurations("PDF_Landscape_A")
'ThisDrawing.Plot.PlotToDevice

'ThisDrawing.ActiveLayout.CopyFrom ThisDrawing.PlotConfigurations("Eng_Acct
Landscape A")
'ThisDrawing.Plot.PlotToDevice

'This line set the plot configuration "DWF6_ARCHD_LAND" current as shown in
your "image1"
ThisDrawing.ActiveLayout.CopyFrom
ThisDrawing.PlotConfigurations("DWF6_ARCHD_LAND")

HTH,

Gary
0 Likes
Message 3 of 4

Anonymous
Not applicable
The text wrapped in the post. The first two sample lines of code should be
one line. Similar pattern for the rest.
0 Likes
Message 4 of 4

Anonymous
Not applicable
The problem is is that it is part of an unattended process that runs on a
separate machine and generates the PDF renditions to be store automatically
on a web site therefore, I can't have a user interface.

Basically, the idea is that I should take the current configuration of the
layout (page size, scale, orientation.... which is defined for, most likely,
another driver than PDFCreator and then I should duplicate it for
PDFCreator.

Is that feasible ?

--
____________________
Francois Dauberlieu
BTM Software Europe B.V.
http://www.btmsoftware.eu
"Gary McMaster" wrote in message
news:[email protected]...
I name all my plot configurations. Once they are named you can call them in
code like in the lines below. Your "Image1" showed that you had at least one
named plot configuration, "DWF6_ARCHD_LAND". You can set all the plot
preferences in the plot dialog box then click the "Add" button and give it
name. It saves ALL of the settings that are active. Set it and forget it
Users can pick the desired plot from the list with no fuss. You can also set
the plot preferences in code and also add the named plot configurations in
code.

'ThisDrawing.ActiveLayout.CopyFrom
ThisDrawing.PlotConfigurations("PDF_Landscape_A")
'ThisDrawing.Plot.PlotToDevice

'ThisDrawing.ActiveLayout.CopyFrom ThisDrawing.PlotConfigurations("Eng_Acct
Landscape A")
'ThisDrawing.Plot.PlotToDevice

'This line set the plot configuration "DWF6_ARCHD_LAND" current as shown in
your "image1"
ThisDrawing.ActiveLayout.CopyFrom
ThisDrawing.PlotConfigurations("DWF6_ARCHD_LAND")

HTH,

Gary
0 Likes