.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RefreshPlotDevice Problems

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
222 Views, 3 Replies

RefreshPlotDevice Problems


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!
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

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!
Message 3 of 4
Anonymous
in reply to: Anonymous

objLayout.ConfigName = "HP DesignJet 755CM"
objLayout.RefreshPlotDeviceInfo()

-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...
Message 4 of 4
Anonymous
in reply to: Anonymous

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...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost