Tuesday, May 3, 2011

Disallow Wall Joins

A short time ago a request was made via this post to be able to disallow wall joins on multiple walls at once at the click of a button (http://www.revitforum.org/showthread.php/676-walls-and-joins). At the time of the post this was not possible using the 2011 API, however the ability to do this via the API has been added to the 2012 suite of products!

I posted some source code in that thread showing how to accomplish the original request and am linking to a compiled version here: https://sites.google.com/site/krispcadresources/KRSPDisallowWallJoins.zip

The work is done with these lines of code:
//loop through each wall and disallow wall joins on both ends.
foreach (Wall wall in walls)
{
    WallUtils.DisallowWallJoinAtEnd(wall,0); //beginning of wall
    WallUtils.DisallowWallJoinAtEnd(wall, 1); //end of wall
}

Obviously there is a bit of work before this point to get the collection of the walls that you want to modify.

The add-in works like this; if there are some walls already selected it will disallow joins on those walls otherwise you will be prompted to choose either all walls in the view or all in the project (or cancel).

To install the add-in simply extract the *.dll and *.addin files to the Addins folder and you're good to go. The default location for Revit 2012 products on Windows XP is: C:\Documents and Settings\%username%\Application Data\Autodesk\REVIT\Addins\2012

6 comments:

  1. It's fantastic, I love you!
    It doesn't work for me. copied addin and dll in the addins folder
    but nothing happened on the ribbon... am I missing something?

    ciao!

    ReplyDelete
  2. You will need to unblock the dll... There are some posts about that on revitforum.org, also make sure you're trying this in the 2012 version

    ReplyDelete
  3. Kristian,

    First of all thank you for a wonderful add-in. We almost every time use this now. But a new requirement for us is to rejoin / Allow the joins back. I know its a quick thing in coding, but I am a newbee in it. can you please redo the new add-in with WallUtils.AllowWallJoinAtEnd condition. We really appreciate it. Else, if you are busy, can you please upload the code and we can edit it on our end.
    Thanks a million.

    Kumar

    ReplyDelete
  4. Hi Kumar,

    I am planning to release this as an app to the Exchange App Store, I will ensure that I include the "Rejoin" feature.

    ReplyDelete
  5. The app has been published to the Exchange store... see this post for more details:
    http://krispcad.blogspot.com.au/2014/03/krispcad-wall-join-manager.html

    ReplyDelete