Bug with PlotType when defining a named page setup

Bug with PlotType when defining a named page setup

Anonymous
Not applicable
354 Views
3 Replies
Message 1 of 4

Bug with PlotType when defining a named page setup

Anonymous
Not applicable
I have written a routine that creates a named page setup based on size of
the drawing border. Everything is working great except for when I try to
set the PlotType property of the PlotConfiguration. It appears that I am
unable to set PlotType to acLimits if the PlotConfiguration is for a Layout.
However, if I create a Named Page Setup using the Page Setup dialog and then
look at the properties of PlotConfiguration, PlotType is set to acLimits.
Why can't I set PlotType to acLimits through code for a Layout and is there
any workaround to this problem?

P.S. The error that I receive is Run-time error '2145386493 (80200003)':
Invalid input.

Thanks for any help,
Kyle Pettibone
0 Likes
355 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Kyle,
just take a look at the AutoCAD standard plot dialog box and you see that limits is for model and layout for layouts if the margins and paper background is visible.

--
Best regards: Jimmy B
CAD coordinator at Emtunga International AB
http://hem.fyristorg.com/cadman/
www.emtunga.com
0 Likes
Message 3 of 4

Anonymous
Not applicable
I have do not have the margins and paper background displayed, therefore the
option that I have in the page setup dialog says "Limits" for both model and
layout page settings.

I found that I was able to get around the problem of not being able to set
PlotType=acLimits in VB by doing it in LISP instead. However I continue to
get unexpected result when plotting, even though the PlotConfiguration is
defined correctly (verified by looking at it in both VB and LISP).

Here is a brief description of what I am doing to define a named page setup
and to plot the drawing.
1) Get the limits and the scale of the drawing.
2) Determine which paper size I should use based on the limits and scale.
3) Determine if the drawing is to be plotted from a layout or from
modelspace.
4) Add a new plot configuration to the plot config collection
Set ConfigName, CanonicalMediaName, and PlotRotation accordingly.
Set PlotType to acLimits.
5) I then start our custom plot program and use the CopyFrom method of the
Layout to specify that I want to use the saved plot configuration. The
drawing is then plotted.

The problem is that the area that is plotted is not the area specified in
the plot configuration. For instance, my limits define a D size border, and
my plot configuration is using a D size media. When I plot the area that is
plotted is only a 8.5x11 area. When I look at the properties of the layout,
it indicates that it is defined for a D size piece of media.

To add to the confusion, if I plot using the standard AutoCAD plot dialog
the drawing is plotted correctly. I do not understand why if the plot
configuration AND the layout are both defined to plot on a D size piece of
media, the drawing plots out on an A size piece of media if I use the VB
methods to plot rather than the AutoCAD dialog.

I apologize for being so long winded. This is difficult to explain. If
anyone has any suggestions or need additional information, please contact
me. If you would like to see the code that I am using, please email me
directly or call.

Thanks for any assistance.
Kyle Pettibone
kpettibone@rh2.com
1-800-951-5400 x5360

"Jimmy B" wrote in message
news:6E50C8649E2CADE85E09FFAEAFE25D90@in.WebX.SaUCah8kaAW...
> Kyle,
> just take a look at the AutoCAD standard plot dialog box and you see that
limits is for model and layout for layouts if the margins and paper
background is visible.
>
> --
> Best regards: Jimmy B
> CAD coordinator at Emtunga International AB
> http://hem.fyristorg.com/cadman/
> www.emtunga.com
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
Kyle,
probably you have to do a RefreshPlotDeviceInfo or...

About PlotType : "Changes to this property will not be visible until after a regeneration of the drawing. Use the Regen method to regenerate the drawing. "

--
Best regards: Jimmy B
CAD coordinator at Emtunga International AB
http://hem.fyristorg.com/cadman/
www.emtunga.com
0 Likes