Way of preventing rebuild in a macro to speed it up?

Discussion in 'SolidWorks' started by Mike, Jul 28, 2004.

  1. Mike

    Mike Guest

    Hello,

    Is there a way of preventing a macro from rebuilding after closing
    each sketch or making a feature in order to speed things up? After I
    have a couple hundred sketches the rebuilds take forever... I already
    have these set:

    Part.SetAddToDB (True)
    Part.SetDisplayWhenAdded (False)

    Any other speed tips would help!

    Thanks,
    Mike
     
    Mike, Jul 28, 2004
    #1
  2. You can interupt the rebuild

    The below code has to be in a Class module.

    Public WithEvents ThisPart As SldWorks.PartDoc

    Private Function ThisPart_RegenNotify() As Long
    ThisPart_RegenNotify = 1
    End Function

    if you don't pass a value to it it will rebuild as normal. If you don't
    turn it off you can't rebuild. And remember that if you want to reference
    any of the geometry created by the macro you have to rebuild it or it will
    not be officially concidered geometry.

    Regards,
    Corey Scheich
     
    Corey Scheich, Jul 28, 2004
    #2
  3. Mike

    rocheey Guest

    Is there a way of preventing a macro from rebuilding after closing
    Well, seeing as you are using the API... when/if you are modifying
    dimensions
    in sketches, do it from OUTSIDE the sketch. It wont rebuild; blast all
    your dims and then call your own rebuild.
     
    rocheey, Jul 28, 2004
    #3
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.