.NET

Reply
*pkirill
Message 1 of 4 (95 Views)

RefreshPlotDevice Problems

95 Views, 3 Replies
07-20-2005 08:12 AM

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!
*Danny P.
Message 2 of 4 (95 Views)

Re: RefreshPlotDevice Problems

07-20-2005 03:51 PM in reply to: *pkirill
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!
*Mike Tuersley
Message 3 of 4 (95 Views)

Re: RefreshPlotDevice Problems

07-21-2005 07:59 AM in reply to: *pkirill
objLayout.ConfigName = "HP DesignJet 755CM"
objLayout.RefreshPlotDeviceInfo()

-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...
*pkirill
Message 4 of 4 (95 Views)

Re: RefreshPlotDevice Problems

07-21-2005 09:53 AM in reply to: *pkirill
Doh!

Thanks for the kick start!

Paul


"Mike Tuersley" wrote in message
news:4907627@discussion.autodesk.com...
objLayout.ConfigName = "HP DesignJet 755CM"
objLayout.RefreshPlotDeviceInfo()

-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.