Slow Equations

Discussion in 'SolidWorks' started by ed_1001, Feb 14, 2007.

  1. ed_1001

    ed_1001 Guest

    This may have been addressed before and if so, pardon my ignorance.
    Why is SolidWorks so slow when using equations? When I open a new
    file and add a dozen or so equations, and then do a <CTRL>Q, it takes
    4-5 seconds to update the mostly empty file. This wouldn't be
    terrible, except that any sketch geometry now also takes this long to
    create. For example, if in the above file, a sketch is opened and 10
    lines are drawn, it will take 4-5 seconds PER LINE. This is nuts. SW
    should not even break a sweat doing a couple hundred simple
    calculations, much less a dozen.

    FYI -
    SolidWorks 2006 SP 4.1 64bit
    Windows XP64
    HP workstation xw2600
    Intel Xeon CPU 2.80GHz Dual Core
    2.0 Gb Ram

    Open a file, go to Tools, Equations, Edit All and add these equations:

    "ShellDir"= 1
    "OverallLength"= 47.75
    "OverallWidth"= 44.75
    "OverallHeight"= 6
    "WallThickness"= 0.125
    "FitNotchOffset"= 0
    "StackOverlap"= 0.75
    "AntiJamHeight"= 0
    "RouterStep"= 0.0625
    "RunOut"= 1.5
    "ThreeWaySize"= .75
    "WallTopWidth"=0.5
    "GussetWidth"=.5
    "StackProportion"= 1.2
    "V1"= "OverallLength" - (IIf("ShellDir" > 0, 0, ("WallThickness" *
    2))) - ("RouterStep" * 2)
    "V2"= "OverallWidth" - (IIf("ShellDir" > 0, 0, ("WallThickness" * 2)))
    - ("RouterStep" * 2)
    "V3"= "OverallLength" / ("StackProportion" *10)
    "AJCalcHeight"= 1.25 * "WallThickness" * cosec(5) - "WallThickness"
    "AJMaxHeight"= "OverallHeight" - "StackOverlap"
    "AJHeight"= IIf("AntiJamHeight" > 0, IIf("AntiJamHeight" >
    "AJMaxHeight", "AJMaxHeight", "AntiJamHeight"), IIf("AJCalcHeight" <
    "AJMaxHeight", "AJCalcHeight", "AJMaxHeight"))
    "3WayTop"= "ThreeWaySize" * 0.5
    "PerimeterJogAngle"= 45
    "3WayExtrudePerimeter"= "PerimeterJogAngle" * 2
    "FNOCalc"= ("OverallHeight" - "StackOverlap") * Tan(5) + ".5" + Tan(5)
    * "WallThickness" - ("WallThickness" / Cos(5)) - 0.25
    "FNO"=IIf("FitNotchOffset" > 0,"FitNotchOffset", "FNOCalc")
    "Offset1_Sketch2"= (2 * tan(5) * ("OverallHeight"-"StackOverlap")) +
    "WallTopWidth"
    "Offset2_Sketch2"= (tan(5) * ("OverallHeight"-"StackOverlap")) +
    "WallTopWidth"

    (be careful with the ones that wrap lines).

    Now <CTRL>Q. Takes my computer about 5 seconds to do the rebuild.
    Any ideas why? If you want real pain, open a sketch and draw anything.
     
    ed_1001, Feb 14, 2007
    #1
  2. ed_1001

    Sam Guest

    I have had a hunch for awhile that some of my performance problems was
    related to equations although I have done no testing. I have had an
    idea of instead of using sw equations to write a vb macro and assign
    to a hotkey to launch it, I am not sure if there would be a performace
    gain or loss or if it would be a wash but if this is causing you a lot
    of problems it might be something to consider. I like the idea of the
    macro because it would consolidate my equations in a central source
    rather than being distributed across multiple sw documents but there
    is also the development time and of course at every new sw release I
    would be sweating bullets worried that my equations macro might not
    work because of some change to the sw api.

    Sorry no answers only sympathy...



    Sam
     
    Sam, Feb 14, 2007
    #2
  3. ed_1001

    ed_1001 Guest

    I've already started down the VB path. The file is much faster at
    rebuild, and there is no delay during feature or sketch creation.
    Additionally, I've created a form to edit the variables that I want
    users to have control over, so it makes their life easier. Time will
    tell how much of a hassle this will be with version changes. Now, if
    VB were only a little less cumbersome. But that's a different rant.
     
    ed_1001, Feb 14, 2007
    #3
  4. ed_1001

    CS Guest

    Wouldn't a design table be quicker. We all know that Excel has one of
    the most proven Equation Calculators in the world, and you can
    accomplish the same task.
     
    CS, Feb 15, 2007
    #4
  5. ed_1001

    CS Guest

    Almost forgot Submit this to your VAR so this can get some attention
     
    CS, Feb 15, 2007
    #5
  6. ed_1001

    ed_1001 Guest

    Yep, a design table would be quicker. IF all of our users had Excel.
    They don't, so I'll finish the project with a VB macro.
     
    ed_1001, Feb 15, 2007
    #6
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.