Import a page setup (or use an existing one in the drawing) that has one
of your plotters specified. In the layout object, use the CopyFrom
method and pass the page setup name as the parameter. That's what I
would do with ActiveX and I would think the process should be the same here.
Hope that helps,
Danny Polkinhorn
WATG
Honolulu
pkirill wrote:
> I've put together a little plot routine but I'm having problems with the
> objLayout.RefreshPlotDeviceInfo() part.
>
> If I include this in my code, any drawing that has a default printer
> that is not one of ours will throw an exception. If I remove this from
> the code, any drawing with the plotter set to none will throw an
> exception. It seems that if the user has the default printer set to one
> of our devices, and I leave this out of my code it all works fine.
>
> I think including the refresh is a good thing, but not if it doesn't
> work. Is there a way to force the default printer before I try my plot
> code?
>
> Can anyone help me work through this issue? Any help is always appreciated!