API: Eeeek! "Ghost" on edges of generated drawing w/properties

Discussion in 'SolidWorks' started by plh, Feb 9, 2004.

  1. plh

    plh Guest

    Hello everyone,
    I am creating a utility which generates formatted drawing sheets from a user
    form. The problem I am having is that when the form appears on the screen, the
    image does not seem to fill the whole window pane. The left and top edges have a
    kind of "ghost" on them. If anyone wants to help I will be glad to send a screen
    (scream?) shot. There is about a 1/4" margin on the top and left hand sides that
    acts as if the drawing is not filling it. If I "ALT/TAB" to another window, then
    back, when I go back the margins contain left over image from the previous
    window. If I maximize and then go back to partial size, the band goes away on
    the top but remains on the left. I have tried it on two different computers, one
    Win2000 and one WinXP. Same thing. If I minimize then maximize again, it returns
    to the top and the left as well. The drawing itself seems to "work" OK, but
    those edges just look nasty.
    The part of the code that actually generates the drawing is below. There are
    other routines that take user input from a form to set up the properties. I
    thank in advance everyone who offers any help!
    -plh

    Private Sub cmbMakeItSo_Click()
    Dim bolRtn As Boolean

    Set swApp = Application.SldWorks

    Select Case intSize
    Case 0
    Set swDrawing = swApp.NewDocument(A_FORMATSHEET, swDwgPaperAsize, 0#, 0#)
    Case 2
    Set swDrawing = swApp.NewDocument(B_FORMATSHEET, swDwgPaperBsize, 0#, 0#)
    Case 3
    Set swDrawing = swApp.NewDocument(C_FORMATSHEET, swDwgPaperBsize, 0#, 0#)
    Case 4
    Case Else
    MsgBox ("Unexpected result in Case Else @ cmbMakeItSo_Click()")
    End Select
    Set swDoc = swApp.ActiveDoc
    swDoc.SummaryInfo(swSumInfoAuthor) = strAuthor
    swDoc.SummaryInfo(swSumInfoComment) = strTitle
    bolRtn = swDoc.AddCustomInfo2("Material", swCustomInfoText, strMaterial)
    bolRtn = swDoc.AddCustomInfo2("Revision", swCustomInfoText, strRev)
    'swDoc.FileSummaryInfo

    End Sub

    I keep hitting "Esc", but I'm still here!
    (If "123" is in the email address that's and anti-spam thing - remove it)
     
    plh, Feb 9, 2004
    #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.