• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    *pkirill

    RefreshPlotDevice Problems

    85 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!
    Please use plain text.
    *Danny P.

    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!
    Please use plain text.
    *Mike Tuersley

    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...
    Please use plain text.
    *pkirill

    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...
    Please use plain text.