Problems with eDrawings Print4 Method

Hello all,

I'm having problems with the Print4 method in eDrawings. I'm using C# in VisualStudio 2005 and I created a small from with a browse button and a print button.

I added the EModelView.dll to my toolbox and created the control on the form. When I'm using Print4, it seems that eDrawings is not recognizing the argument EMVPrintType, no matter what I select there, it always will be the current screen image. Also the EMVPrintOrientation in the SetPageSetupOptions seems to have no effect.

EModelView and AxEModelView is added to the references in my project. Does anybody know what the problem is?

Here is my code:

using System;
using System.Windows.Forms;
using System.Drawing.Printing;
using EModelView;

namespace PrintTool
{
    public partial class PrintToolForm : Form
    {
        private void browseButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "SolidWorks Drawings (*.slddrw)|*.slddrw|DXF Files (*.dxf)|*.dxf|AutoCad Drawings (*.dwg)|*.dwg|All Files (*.*)|*.*";

            if (openFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                fileToPrintLabel.Text = openFileDialog.FileName;
                axEModelViewControl.OpenDoc(openFileDialog.FileName, false, false, false, "");
            }

            if (openFileDialog.FileName == string.Empty)
            {
                MessageBox.Show("Invalid File selected", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }

        private void printButton_Click(object sender, EventArgs e)
        {
            string printerName = string.Empty;

            for (int i = 0; i < PrinterSettings.InstalledPrinters.Count; i++)
            {
                if (PrinterSettings.InstalledPrinters[i].ToLower().Contains("hp1055"))
                {
                    printerName = PrinterSettings.InstalledPrinters[i];
                    break;
                }
            }

            axEModelViewControl.SetPageSetupOptions(EMVPrintOrientation.eLandscape, 27, 0, 0, 1, 0, printerName, 0, 0, 0, 0);
            axEModelViewControl.Print4(true, fileToPrintLabel.Text, false, false, false, EMVPrintType.eOneToOne, 0, 0, 0, false, 0, 0);
        }
       
        public PrintToolForm()
        {
            InitializeComponent();
        }
    }
}

Thanks in advance

Matthias

SolidworksApi macros