Results 1 to 6 of 6

Thread: RS2010 .NET suspend regenerating while code running

  1. #1
    Active Member
    Join Date
    2008-02
    Location
    New York
    Posts
    81
    Login to Give a bone
    0

    Default RS2010 .NET suspend regenerating while code running

    Hello everyone
    I have a code that updates shapes and other parameters of a large number of members from an Excel spreadsheet.
    While this is accomplished, member by member, periodically Revit runs a "regeneration"
    which shows up at the bottom left cormner of the screen and which interrups any work I am tryng to do by popping up a warning windows as well.
    Any way to disable that so that it only happens once at the end, after the code is done running?

  2. #2
    Active Member
    Join Date
    2008-02
    Posts
    58
    Login to Give a bone
    0

    Default Re: RS2010 .NET suspend regenerating while code running

    I believe this blog post might be what you're looking for. You'll set the regeneration option to manual then call the regenerate method in the document after you've completed your changes.

    http://thebuildingcoder.typepad.com/...de-danger.html

  3. #3
    Active Member
    Join Date
    2008-02
    Location
    New York
    Posts
    81
    Login to Give a bone
    0

    Default Re: RS2010 .NET suspend regenerating while code running

    Thanks Abe, but , is this feature available to the 2010 API?
    I tried:
    [Transaction( TransactionMode.Automatic )]
    [Regeneration( RegenerationOption.Manual )]

    in my code and it wasn't recognized. Is there something I need to add to the namespace?

  4. #4
    Active Member
    Join Date
    2008-02
    Posts
    58
    Login to Give a bone
    0

    Default Re: RS2010 .NET suspend regenerating while code running

    I didn't see the Document.regenerate() method in the 2010 documentation, so it appears it's only available in 2011 by these means. I've not used the 2010 API so if their is an alternative way of doing this I'm not familiar with it.

  5. #5
    I could stop if I wanted to Danny Polkinhorn's Avatar
    Join Date
    2003-12
    Location
    San Francisco, CA
    Posts
    448
    Login to Give a bone
    0

    Default Re: RS2010 .NET suspend regenerating while code running

    For 2010 (and prior) you need the SuspendUpdating method. You'll also want the Web Update 2 if you don't already have it as there were some enhancements to it in that update.

    HTH,

  6. #6
    Active Member
    Join Date
    2008-02
    Location
    New York
    Posts
    81
    Login to Give a bone
    0

    Default Re: RS2010 .NET suspend regenerating while code running

    thanks Danny, will try that!

Similar Threads

  1. Replies: 5
    Last Post: 2013-10-16, 05:39 PM
  2. rs2010 consistency checks
    By 777rivendell in forum Revit Structure - General
    Replies: 0
    Last Post: 2010-01-14, 05:54 AM
  3. Replies: 3
    Last Post: 2009-08-14, 09:54 PM
  4. RS2010 crashing every 10 minutes - HELP please
    By andrew.lawrence in forum Revit Structure - General
    Replies: 5
    Last Post: 2009-06-12, 05:57 PM
  5. Running a script containing LISP code
    By ccowgill in forum AutoLISP
    Replies: 25
    Last Post: 2006-10-16, 11:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •