Thursday, November 17, 2016

AU2016 SD20868

Autodesk University 2016 has come to a close for us now and it was very enlightening and entertaining. I enjoyed catching up with old friends and making a few new ones as well.

I taught a class entitled "SD20868 - Revit Usage and Model Data Reporting Simplified with C#"

It was a full solution style overview class showing how to get verb data out of Revit and into a graphical dashboard showing various Model and User metrics.

The purpose was to show and share how this can be done using ASP.NET coupled with a few other modern(ish) web development techniques. I want to thank the folks that provide the Gentelella web template and hope everyone enjoyed the class.



Tuesday, August 23, 2016

Revit Key Schedule Data Export

Have you ever had a need to export all of your key schedule data? The sample code provided below was built for Revit 2015 and should upgrade just fine to newer versions if need be.

Since you cannot transfer updates to existing Key Schedules from one project to another, I needed a way to export the data to a standardized key schedule definition so that I could easily import that updated definition information to a new or existing key schedule in an external project. This sample code is what I am using to export all of my key schedules including all of their row data to json file.

Sample data visualization thanks to our friends at http://jsonmate.com/



No I will not make a Dynamo definition for this :)

Enjoy...

Wednesday, April 27, 2016

Delete Empty Elevation Marker Tags

It is pretty common for a model to end up with a bunch of abandoned elevation marker tags. There are a bunch of ways that this can happen and depending on how you have your elevation tag symbols defined can be difficult to find visually for removal.



One of the supreme beings that I used to work with at CASE built a means of doing this in Dynamo.

This is a simple routine that finds these and eradicates them from your model...


Friday, April 1, 2016

Getting Families to Display in RCP if Below View Cut Plane

I haven't posted anything in quite a while and plan to start posting more often again. I've got loads of new code related ideas that I will be posting in the not so distant future, but for now, we're going to show a popular family editing trick to get elements to display in RCP views when their base geometry might dictate otherwise.

Plan regions are not necessary to solve this issue...

This trick is also handy for furniture elements (tables, etc.) that you wish to be visible in RCP views even though they don't contain any visible geometry above the RCP view range cut plane.

Open your family in the editor and add a new model line to the top of your family so that the top of this line will always extend just beyond your view range cut plane in the project environment. Be sure to set this model line to invisible so that you don't see it anywhere in the project environment.



Your element will not be visible in an RCP view with a cut plane higher than the top of your geometry since the model line passes through it in the project environment. Revit will display the whole family for you.

Friday, April 24, 2015

Today is my Last Day at CASE

First off, let me say that I am very grateful to have had the opportunity to join and to have made the decision to join CASE back in the summer of 2011 and regret nothing. The leadership there always made me feel welcome and it was totally worth the ride!

We were less than 10 employees in the USA with another group of 4 down in Montevideo. CASE is now 60+ people strong all over the globe. We triumphed through everything put in front of us and served the AEC industry in what I like to believe was a positive way. I'm certain we will all remain good friends and colleagues going forward.





My decision to leave was difficult, but one that I had to make. I need to get back to work in my local market in the city that I love... Austin, TX. I feel confident that I am leaving my legacy in capable hands and that CASE will continue to improve well into the future.

Special thanks to Dave Fano and Federico Negro for finding me and convincing me to join their weird club! I'll miss working with you freaks! I'll be sending you guys some bootlegged CASE Polo Shirts.




Friday, November 21, 2014

Revit Dockable Pane Failures with Windows 8 Video Scaling

I'm not sure if this is a bug, or just something that I'm missing, but there is definitively something weird with how Revit dockable pages display on systems that implement video scaling, namely windows 8.1 on retina displays.

Let me first start by explaining what I mean by video scaling. Windows has a feature under display settings that allows you to "scale" objects on your display. This is different from the use of resolution. Here's an illustration of what I'm talking about:


The dockable page in question is basically divided up into two even columns down the center. When the Windows video scaling is set to anything other than 100%, it throws off the coordination between the grid and the host page width. Sorry for having to blur out the controls, but here is a sample of what my dockable page looks like (cutting off about 50% on right hand side):



I went through the normal process of handling this through traditional WPF windows means thinking that I'd be out of the woods, but nope. My dockable page object is surrounded by one master grid, but for some reason on systems with video scaling active, this grid does not know how large it is supposed to be. The whacky result is what you see above with the cut-off issues.

The "traditional" code that should have worked, but did not is shown below. It gets the video scaling from the Matrix object and then applies that value to the ScaleTransform of my MasterGrid which is of course the base grid at the top level of the page layout.


        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            Matrix m = PresentationSource.FromVisual(Application.Current.MainWindow).CompositionTarget.TransformToDevice;
            double dx = m.M11;
            double dy = m.M22;

            ScaleTransform s = (ScaleTransform)MasterGrid.LayoutTransform;
            s.ScaleX = 1 / dx;
            s.ScaleY = 1 / dy;
        }


What I ended up having to do was first get the scaling values from the matrix object (similar to above) and then use the SizeChanged event on my Revit dockable page to adjust the width and height to match the size of the page object.

The code that ended up working for adjusting the host grid object size with scaling is shown here.

    private void MainPage_Loaded(object sender, RoutedEventArgs e)
    {
      Matrix m = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
      double dx = m.M11;
      double dy = m.M22;
      GridMain.Width = this.Width / dx;
      GridMain.Height = this.Height / dy;
    }

The code above gets the current Windows video scaling in the same way, but the difference is that instead of applying scaling, we're just calculating the corrected widths and heights for the form. Here's how the page looks after the updates (slightly less blur):


I'm curious if anyone else has run into this and if so, how did you deal with it?

Wednesday, July 23, 2014

It's Been a While

Well you guys, a year has passed and you'll see some fresh posts. I had some contractual terms preventing me from being able to post anything here for a while, but that excuse is no more (always be careful about what you sign).

In other news, I'll be teaching a class at Autodesk University 2014 in December entitled "Using Revit API Events to Manage Miracles." The class ID is SD5399 and I'll be talking about... you guessed it... Revit API Events! Hopefully I don't get stuck with the last time slot of the entire event like I did last time (first session of the conference is pretty tough also though).

Thursday, July 18, 2013

AEC-Apps Wins the ArchitectMagazine R+D Award

If you haven't checked out AEC-Apps yet, you really should. That site has caught the industry by storm with tons of people helping make it better every day, why not you? AEC-Apps is a social application discovery and rating solution designed by the CASE guys under partnership with SOM.

Architect Magazine published an article today awarding AEC-Apps their coveted R+D award! We have a few people to thank for this tool and all of its success. Below are just a few of the folks that played a major roll in the development and design of AEC-Apps. Do any of these faces look familiar (in no particular order)?

  

  

Here's a shot of the home page, we hope you check it out if you have not already, and of course it is 100% free!


Monday, July 8, 2013

Announcing the 2013 Hands-on Revit API Training Workshop

It is time to announce the second annual CASE Revit API Hands-on Workshop!! We have dates and pricing ready and you can book a spot today! Spots are very limited, so reserve your spot early!

This workshop is designed for beginners!

All computers and software will be provided! All you need to bring is excitement and a willingness to learn... If you have concerns about hotel pricing, we have a few insider tips that we can let you in on to avoid those costly hotels. Contact us for details!



Free Stuff:
All attendees will receive a free 3 month trial membership to our CASE Pro Apps
http://apps.case-inc.com/proapps

When:
The workshop will run four days from Tuesday September 10th to the 13th. Workshop days will begin at 9am and finish at 5pm with a two hour break at noon. You will be building all kinds of useful tools that you can take with you!

  • Day 1 - (Tuesday Sep. 10) Introduction to .NET and Concepts
  • Day 2 - Introduction to Revit API
  • Day 3 - Data Samples
  • Day 4 - Elements and Geometry
  • Social - After conclusion of day 4

Where (The CASE Office):
401 Broadway, Suite 1600 (16th floor)
New York, New York
Map: http://bit.ly/N1PteT



Pricing!
We are offering an early bird discount that will gradually increase as we get closer. Act fast because spots are limited!

$1,500 (Aug 1 - Aug 17)
$1,850 (Aug 18 - Aug 31)
$2,000 After Aug 31


Booking a Spot
Send an email to [info at case-inc dot com] and copy myself [d dot rudder at case-inc dot com] with a title of "CASE Revit 2013 API Workshop" letting us know you are interested in reserving a seat for the API workshop. Please include a phone number and we will contact you to secure payment. Your price will lock in on the date your email is sent to us if we do not get back to you the same day (highly unlikely).

Thanks for your interest and we're looking forward to helping you get your Revit API learn on!


Thursday, January 10, 2013

CASE Apps Updates

Our BETA Subscription tools have launched!  We also took this opportunity to reorganize how we are loading these items into the Revit ribbon. All of the CASE tools still get installed from the CASE Add-In Manager and install onto a custom ribbon tab named "Case Design, inc."

This new ribbon design also provides automatic updates to the latest version when it gets posted to our servers (only for tools that you already have installed)!

There are only 4 subscription tools in the system at the moment, but several others are on the way within the next few weeks. We have also added a FAQ page that answers some of the most frequent support questions that we get about these tools.



If you have not received your free 60 day trial of the subscription tools, email me and I'll get an invite sent over to you.

Friday, December 7, 2012

AEC APPS is Launching!

We've been working hard on a web portal where people can socially track, rate, and explore all kinds of applications for AEC related workflows. You'll notice that these tools are not just limited to design and that you'll discover applications to cover just about any kind of workflow that AEC professionals run into.

Since it is entirely social, if there's an application you think i missing, you can add it yourself. Get involved and create a free profile today at https://aec-apps.com/


Tuesday, December 4, 2012

New Publication

Some of you may have heard about a small .NET publication I've been working on. Well... it has been published and you can get your very own copy! Don't read too much into the image on the cover ;)

It's a cookbook style how-to book packt with loads of code samples suited for developers of just about any experience level.

http://www.packtpub.com/customizing-autodesk-revit-2013-with-net/book




Wednesday, October 24, 2012

Setting the Visual Studio Version for Specific Solution Files

If you have multiple versions of Visual Studio installed such as 2010 and 2012, you can easily control what version of Visual Studio will be used to open your solution when it is double clicked.

First open your *.SLN file in notepad and adjust the very top two lines in the file to the following:

  • Visual Studio 2010
    • Microsoft Visual Studio Solution File, Format Version 11.00
    • # Visual Studio 2010
  • Visual Studio 2012
    • Microsoft Visual Studio Solution File, Format Version 12.00
    • # Visual Studio 2012

Thursday, October 11, 2012

CASE Add-In Manager Updated

Guess what! The CASE Add-In Manager has been updated! You may not notice anything too spectacular about this update, but just about everything about it has been improved.

http://apps.case-inc.com/content/add-manager

  • Previously installed tools on your system will be detected and checked as already installed when you run the manager
  • If you have a strong firewall policy at your office and you've previously seen zero of the tools in the manager, this update might fix that for you! Give it a try and let me know!
  • We will be unveiling a suite of paid subscription tools this year at AU2012, so the
    "Activate Subscription" button will remain grayed out until this official announcement...
  • New snazzy icon (I made it myself)!



Tuesday, October 2, 2012

Prevent Double Click Opening of Central Files

It happens all too often that a rookie user or non Revit savvy person double clicks on an RVT file to open it. If this RVT is a work shared central model then it is a real cluster F%#&. This can be disastrous to anyone working in the model as well as the model's health in general if not correctly saved back as a central model with all elements properly relinquished.


This post will show a way to keep RVT files from being able to be opened by double clicking them (do this on the client machines where you think run a high risk of causing an issue with this). This still will not prevent a "smart" user from dragging an RVT file onto their Revit shortcut on their desktop though, so be aware of that.

This can easily be setup in your IT Manager's Group Policy for all current users of a domain if you really want to enforce this for everyone... or maybe just to users within a certain group?... you get the idea.

You do NOT need admin privileges to make this adjustment because it will change the setting for the current user only.

Create a new txt file (or download mine) and place the following lines in it
(save it as "RevitFileOpenTroll.reg"):


Windows Registry Editor Version 5.00
 
[HKEY_CURRENT_USER\Software\Classes\rvt_auto_file]
@="BIM Model :P"
 
[HKEY_CURRENT_USER\Software\Classes\rvt_auto_file\shell]
 
[HKEY_CURRENT_USER\Software\Classes\rvt_auto_file\shell\open]
 
[HKEY_CURRENT_USER\Software\Classes\rvt_auto_file\shell\open\command]
@="explorer http://wikihelp.autodesk.com/Revit/enu/2013/Help/00001-Revit_He0/2278-Collabor2278/2333-Working_2333/2354-Working_2354/2363-Opening_2363"

Double click this file on any machine that you want to make this change for. After running this registry updater, double clicking an RVT file will open the Autodesk Wiki page showing the proper method for opening a workshared model.

You can change the web site to one of your own if you like that tells the proper method for opening an RVT in your organization.

Thursday, September 27, 2012

Free CASE Revit Add-In for October

It's that time again! I've just posted the free CASE Revit Add-In for October!

Basic Reporting (Hosting and Formulas) for Revit 2012 and 2013

This awesome little tool will export a CSV wherever you tell it of all formulas used in any family loaded in your current model. It can also report a full hosting report showing what element is hosting what. Let us know what you think below in the comments!

You will need to register and get the CASE Add-Ins manager installed to get these tools. You can get the path to the Add-In manager from here (after you register):
http://apps.case-inc.com/content/basic-reporting-hosting-and-formulas

For those of you that have strict firewall policies and do not see any Add-Ins in the Add-In Manager, we are working on an update that should be able to bypass and fix this issue ;)

Wednesday, September 19, 2012

Getting all File Based Family Elements by Category

I haven't shared any code on here in a while and thought this might be a good time to get back in the general sharing mode. I get asked a bunch about how the best way is to collect elements in the model especially file based component families (FamilySymbol).

This sample should work in Revit 2012 as well as Revit 2013.

Here's a quick and easy way to get all elements in your model of FamilySymbol organized by Category. We'll use a basic Dictionary class to hold the elements since Dictionaries are super fast to access values from without any iteration required.

First you will need to declare your dictionary somewhere in your code as either a private or public property (you decide), I'm using a property in this example.


  ''' <summary>
  ''' All Family Symbol Elements in the Model by Category
  ''' </summary>
  ''' <value></value>
  ''' <returns></returns>
  ''' <remarks></remarks>
  Public Property FamilySymbolElements As Dictionary(Of Category, List(Of FamilySymbol))


The next thing is to provide a subroutine where you can perform the gathering of the elements. After we instantiate a fresh dictionary to hold the data, we build a filtered element collector that collects elements by their class type. The class type we're interested in is FamilySymbol.

We then iterate over the elements returned by the collector and check if the category that the element belongs to is in our dictionary. Where the category does not exists as a key in our dictionary, we add a fresh list containing the single element. Where it already exists, we get the list containing the elements and add the new element to the list and apply the updated list back as the value to the dictionary for that category.


  ''' <summary>
  ''' Get all Family Symbol Elements
  ''' </summary>
  ''' <remarks></remarks>
  Private Sub GetSymbols()
 
    ' Fresh Dictionary
    FamilySymbolElements = New Dictionary(Of Category, List(Of FamilySymbol))
 
    ' Collector
    Using col As New FilteredElementCollector(Doc)
      col.OfClass(GetType(FamilySymbol))
      For Each x In col.ToElements
 
        Try
 
          ' Cast and Collect
          Dim m_fs As FamilySymbol = TryCast(x, FamilySymbol)
 
          ' Does the Category already exist in the system
          Dim m_cat As Category = x.Category
          If Not FamilySymbolElements.ContainsKey(m_cat) Then
 
            ' New List
            Dim m_l As New List(Of FamilySymbol)
            m_l.Add(m_fs)
            FamilySymbolElements(m_cat) = m_l
 
          Else
 
            Try
 
              ' Updated List
              Dim m_l As New List(Of FamilySymbol)
              FamilySymbolElements.TryGetValue(m_cat, m_l)
              m_l.Add(m_fs)
 
              ' Update the Key
              FamilySymbolElements(m_cat) = m_l
 
            Catch ex As Exception
 
            End Try
 
          End If
 
        Catch ex As Exception
 
        End Try
 
      Next
    End Using
 
  End Sub


Now we have a complete list of FamilySymbol elements in the model organized by category.

Monday, August 6, 2012

SOLD OUT - CASE Revit 2013 API Workshop

Thanks to all that enrolled into the Inaugural CASE Revit 2013 API Workshop! This is the first of many I'm sure based on the amount of interest that we saw from you guys.

For those of you that did enroll, please plan to stay late on Friday as we will be throwing a bit of a happy hour social in the office. We have a ping pong table and Fed thinks he can't lose... so there's that...



We are looking into the possibility of a travelling roadshow where me might end up doing a workshop in the Portland Oregon area as well as Dallas Texas... Stay tuned for updates if we figure out a way to make this work publicly.


Friday, July 27, 2012

CASE Revit 2013 API Workshop

It's time to make this official! We have dates and pricing ready for you guys and you can book a spot today! All computers and software will be provided so all you need to bring is excitement and a willingness to learn.



This workshop is also where I will be unveiling our subscription tools and giving away a few free 90 day trial memberships! You wont want to miss this because the general public will not be able to access these tools until November!

When:
The workshop will run four days from Monday September 11th to the 14th. Workshop days will begin at 9am and finish at 4pm with a one hour break at noon. You will be building all kinds of useful tools that you can take with you!

  • Day 1 - (Tuesday Sep. 11) Introduction to .NET and Concepts
  • Day 2 - Introduction to Revit API
  • Day 3 - Data
  • Day 4 - Elements and Geometry

Where (The New CASE Office):
401 Broadway, Suite 1600 (16th floor)
New York, New York
Map: http://bit.ly/N1PteT



Pricing!
We are offering an early bird discount that will gradually increase as we get closer. Act fast because spots are limited!
$1,500 until Friday August 3rd, 2012
$1,700 (Aug 4 - Aug 17)
$1,850 (Aug 18 - Aug 31)
$2,000 After Aug 31

Booking a Spot
Send an email to [info at case-inc dot com] and copy myself [d dot rudder at case-inc dot com] with a title of "CASE Revit 2013 API Workshop" letting us know you are interested in reserving a seat for the API workshop. Please include a phone number and we will contact you to secure payment. Your price will lock in on the date your email is sent to us if we do not get back to you the same day (highly unlikely).

Thanks for your interest and we're looking forward to helping you get your Revit API learn on!


Wednesday, July 25, 2012

CASE Add-Ins Manager is Here

Some of you may be more excited than others about this announcement... we at CASE are moving away from individual installers for our free tools. Instead we are offering a single desktop utility (no admin privileges required to install) that you can use to install and discover new tools that we offer.

http://apps.case-inc.com/content/add-manager



You may also notice a grayed out button referring to some kind of subscription... stay tuned for announcement relating to this as we will begin offering our high-powered tools to the general public via monthly or annual subscription...

Oh, and we have the August free tool ready to install using this new Add-In Manager, take a look at what Nathan Miller developed (this one was not my doing):
http://apps.case-inc.com/content/import-opennurbs-3dm-file-data