DWG to PDF Error SetWindowToPlot method : Using COM and C++

Discussion in 'AutoCAD' started by meenaisus, Jul 17, 2006.

  1. meenaisus

    meenaisus Guest

    Hi All,

    I'm trying to create PDF from DWG file, also implemented all
    functionalities by using COM.

    I've created an Instance of AutoCAD and opened a DWG file. From the
    instance i'm getting active layout. But i'm facing some problem in
    using "SetWindowToPlot" method. It doesn't do as i expected. But the
    same time, I can plot a DWG by view, Layout and extend methods. Here
    are more details :

    After setting all the properties I could not plot the select window
    coordinates using SetWindowToPlot (const _variant_t & LowerLeft, const
    _variant_t & UpperRight );

    Code snippet:

    layout->RefreshPlotDeviceInfo();
    layout->StandardScale =acScaleToFit;
    layout->PlotRotation = ac90degrees;
    layout->PlotType = acWindow;

    layout->ConfigName = ("Distiller123.pc3");

    // setting the co-ordinates binding the double values of Lower left and
    upper right corners co-ordinates in //Using SafeArrayBound, VARIANT
    type with double values.

    layout->SetWindowToPlot(_variant_t(filterType),_variant_t(filterType2));

    document->Plot->PlotToDevice(plotConfigName.AllocSysString());

    Your help is highly appreciated.

    Thanks,
    Meena
    meenaisusATyahoo.co.in
     
    meenaisus, Jul 17, 2006
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.