Printout2 Going Nuts!

Discussion in 'SolidWorks' started by Finvarra, Nov 14, 2007.

  1. Finvarra

    Finvarra Guest

    I Need Some Help with the PrintOut2 command used in The SW2007 API.

    Basically What is happening is That I open a Drawing Document and then
    try to go through the Sheets and Only print the Sheets that dont have
    specific words in their names.

    But for some unknown reason if the drawing has 2 sheets.. (Sheet1) +
    (PROFILE) They Both Print!??

    Here is the basics of the Code that I used (From the API Help).


    For iSheet = 0 To iSheetS

    bPrintT = True

    If InStr(1, UCase$(vSheets(iSheet)), "LASER") > 0 Then

    If IncLASER = False Then

    bPrintT = False

    End If

    End If

    If InStr(1, UCase$(vSheets(iSheet)), "WATER") > 0 Then

    If IncWATER = False Then

    bPrintT = False

    End If

    End If

    If InStr(1, UCase$(vSheets(iSheet)), "PROFILE") > 0 Then

    If IncPROFILE = False Then

    bPrintT = False

    End If

    End If

    If bPrintT = True Then

    swDrawing.ActivateSheet (vSheets(iSheet))

    DoEvents

    nPrintSheet(0) = iSheet + 1
    vPrintSheets = nPrintSheet

    swModelExt.PrintOut2 (vPrintSheets), icopies, False,
    stPrinter, ""

    End If

    Next
     
    Finvarra, Nov 14, 2007
    #1
  2. Finvarra

    Ben Guest

    Finvarra

    There are some great API guys lurking around www.SolidMentor.com that
    may be able to help out you should post this there too.

    Ben
     
    Ben, Nov 17, 2007
    #2
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.