Solidworks 2007 x64 SP2.2 Server Threw an Exception

Discussion in 'SolidWorks' started by Swartzy, Mar 21, 2007.

  1. Swartzy

    Swartzy Guest

    I get the subject error w/ the subject version of Solidworks running
    a
    macro I have which opens a drawing, makes several modifications to
    it,
    saves it, closes it and moves on to the next drawing in the set
    (FilesArray). I get the error after a few iterations through when I
    attempt to close the drawing currently being processed... no rhyme
    nor
    reason.

    I've commented out that code so it doesn't attempt to close any of
    the
    drawings it's processing... but I just got the error as it was saving
    to .dwg format too! Some of these drawing packages are rather large,
    and I don't think even x64 is going to like having 130 drawings open
    at one time. So... I need to solve this problem.


    What causes this error? In the past it's usually been when you try
    to
    close a drawing that's already closed or attempt to do something
    really stupid... but that's definitely not the case here.


    I also didn't have the problem w/ Swx 2006... but I can't remember if
    it occured on the x86 version of 2007.


    Any help would be appreciated. I've also had problems w/ certain
    drawings in the set being read only (usually the second to last one)
    which I cannot figure out as there is no reason for it... everything
    is local, the files are new (copied to a new name earlier in the
    macro) and have never been opened. Hence the saveas different name
    if
    there is an error saving.


    The code excerpt:


    bRet = swModel.Save3(swSaveAsOptions_Silent, (nErrors), (nWarnings))
    If bRet <> True Then
    Debug.Print "Error saving: " & swModel.GetTitle & ", w/
    error:
    " & nErrors
    swModel.SaveAs4 FilePath & "\" & Left(FilesArray(j, 0),
    Len(FilesArray(j, 0)) - 7) & "-A.slddrw", swSaveAsCurrentVersion,
    swSaveAsOptions_Silent, 0, 0
    Else
    Debug.Print "Saved: " & FilesArray(j, 0)
    End If


    'swModel.SaveAs4 FilePath & "\" & Left(FilesArray(j, 0),
    Len(FilesArray(j, 0)) - 7) & ".dwg", swSaveAsStandardDrawing,
    swSaveAsOptions_Silent, 0, 0
    'Debug.Print "Attempting to close: " & swModel.GetTitle
    'swApp.CloseDoc swModel.GetTitle
     
    Swartzy, Mar 21, 2007
    #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.