Sunday, 29 January 2017

Project Information in Revit Schedules

Those of you who read my previous blog post on Using Totals in Schedule Formulas, may have noted from the comments at the end that there was a subtle, undocumented change to schedules in Revit 2017.  I picked this up in discussions with Andy Milburn - so I thought we should share it clearly:

Revit 2016 Schedules

When defining a schedule in Revit 2016, the choice of category is in a drop-down menu in the lower left of the dialog box.  Just below it is a checkbox for including elements in linked Revit files - this is unticked by default.

If you click on the category drop-down menu for 'Select available fields from' you may get other options depending on the defined category for the schedule.  Typically, you will not see 'Project Information' in the list (For Casework, Rooms and Spaces are available).

However, once you tick the 'Include elements in links' checkbox, 'Project Information' suddenly becomes available;  not surprisingly RVT Links also shows up


The omission of  'Project Information' is presumably a long-standing bug, which most likely caused many users to not realise that it was possible to add Project Information to any schedule.

Revit 2017 Schedules

In Revit 2017, the dialog box has been redesigned so that not only are many text-based icons replaced with picture icons, but the 'Select available fields from' Category drop-down menu has been moved to the top left of the dialog box.  This is entirely logical once you get used to the change.


In the process, they have also fixed the bug, so that 'Project Information' fields are always available regardless of whether the 'Include elements in links' checkbox is ticked.

Now it should be easier for people to add Project Information to any schedule, as it is much more obvious. 

Thanks to Andy Milburn and Anthony Constantinidis for alerting me to some of these subtleties.

Sunday, 22 January 2017

Using Totals in Formulas in Revit Schedules

This has been a frequently asked question on the various forums over the years:
"Is it possible to use a grand total from a schedule in a formula in Revit".  The first response is always No!  Then eventually someone will mention the arcane workaround but it is not always clearly explained so I have decided to show a simple example of what the problem is, and how the workaround might be applied.

I must confess that this is not my original idea - in fact I have found references to the workaround, as far back as 2006 on AUGI by Leonard Raiz (one of the Revit Founders).  More recently (2011), Martijn de Riet published a description of how to calculate a ratio between two area types - this includes the workaround but does a few extra tricks of calculating a ratio of two different sub-totals after first separating them from one grand total, so it is not that easy to understand just the 'totals in formulas' workaround.  Many thanks to Martijn, as I originally learnt the technique from his blog posting.


The Problem With Schedule Totals

Let us suppose that you want to schedule a series of floor areas for a multistorey building and then calculate the ratio between the total of those floor areas against the site area - in Australia we call that the 'Floor Space Ratio'.  There are actually two problems that Revit presents us with here:
  • Revit apparently does not allow you to insert a total of several values into a formula- it only performs the calculations on individual values in each row
  • You can't create a schedule that combines 'Areas' and 'Property Line Areas' because they are different categories - this is another topic so we'll use another quick workaround to deal with that here.
In this example I will use Mass Floor Areas, but they could easily be normal Areas

The Floor Space Ratio calculation is defined as:   'Gross Floor Area' divided by 'Site Area'
It is usually represented as the 'number : 1'   eg. 2.5 : 1

Step 1

  • The first step is to create a Mass Floor schedule, and add the Levels plus Floor Areas
 
  • The first problem we encounter is that you cannot combine a Mass Floor schedule with Site category schedules - so you cannot include the site area value that Revit automatically calculates from your property lines

Workaround 1

  • Create a shared parameter and apply it to the Project Information category
  • This will be a value that you have to type in to the project information page once - and update it if the site area changes, which is obviously a technique prone to user error.  If your site area is not yet settled, and is constantly changing, I would not recommend this method.
  • Once the value is in, you can add the shared parameter to your schedule just by changing the category from the drop-down list and choosing Project Information
 
  • The same value for Site Area will appear in each row, so make sure not to calculate totals for this parameter.
 

Step 2

  • Add a calculated parameter to the schedule, called 'Calc Ratio' (or some such) 
  • Make it a 'Number' type with this formula:
    Floor Area / Site Area
  • Note that each row has its own calculation of the ratio - none of which is correct.
  • If you make the parameter 'Calculate Totals', the Grand Total value of the Ratio will actually be correct - but it makes for a very confusing schedule
  • You could of course collapse the schedule down to one line (untick 'Itemise Every Instance'), and hide the totals - this would display the correct Ratio - but you may require the schedule to show individual floor areas
 
However, there is a way to get Revit to display all the rows of data and to perform calculations on the total value - it requires the following workaround:

Workaround 2

  • In the schedule, add a new calculated parameter called 'F Area Percentage'
  • This time, make it a percentage calculation - click on the 'Percentage' radio button
  • Then select 'Floor Area' as the parameter to calculate 'Of'
  • Leave it to calculate 'By' Grand Total
  • This will list each floor area as a percentage of the total
  • Create another new calculated parameter, called 'Total Floor Area'
  • leave it as a Formula calculation, with type 'Area'
  • Add the Formula:
    Floor Area / F Area Percentage
  • This will give you the correct overall floor area in each row 
  • Be sure not to calculate totals for this parameter.
 
  • Now change the Ratio formula to calculate using the Total Floor Area:
    Total Floor Area / Site Area
  • This will give the correct ratio in each row
  • Remove the Calculate Totals setting for this parameter as the total would be a crazy value

  • You can then hide the two intermediate calculations (Total Floor Area and F Area Percentage) to get a schedule showing the correct site area, floor area and ratio in every row
 

Tidy Up

  • To make the schedule read a little more cleanly, you could sort it by Site Area, with a Header, and then hide the Site Area parameter column - but it only shows the value of the Site Area, not its parameter title, which is not clear enough

  • Then add another Calculated Parameter at the beginning - a text type with a formula:
    "Site Area :"
  • Sort by that parameter before the Site Area, and hide that one too
  • It puts them on two different lines but at least it removes some repetitive information from the body of the schedule
 
 
  • You could try the same with the Floor Space Ratio but unfortunately Revit does not like to sort a schedule by such a formula  - it does not show in the Sort by or Filter list (a bug perhaps? or just a special feature?)
  • You could also put in a few extra text formulas (with blank headings), although they will repeat the same information

Workaround 3

If you can cope with two schedules, it is a lot easier: a simple one liner schedule for the Floor Space ratio calculation, plus a separate schedule list of all the floor areas.
  • You can either create two similar schedules as described above, but collapse one of them down to one line (untick 'Itemise every instance'), and remove the calculations from the full list.
    or
  • Revit makes it simpler to do this operation on Mass Floor areas because you can just create a Mass schedule (as opposed to Mass Floors) that already has a property called 'Gross Floor Area', in which it automatically calculates the total of the Mass Floors - thus you can do a direct calculation on it


I hope this explains the technique clearly.  If you want something more complex, then refer to Martijn de Riet's blog posting on how to calculate a ratio between two area types

Thursday, 12 January 2017

Underline Revit Schedule Headings

I was recently asked if it is possible to just underline the Revit schedule column titles without having all the lines/boxes below.  At first I thought it was not possible, so I figured out a crazy workaround.  As I was checking the workflow for documenting it on this blog I discovered something I didn't know (or at least had forgotten but once knew), which made the solution quite easy.  I have always found that preparing conference presentations is a great way of learning a subject thoroughly - instead of thinking that you know it all.  It seems that writing a blog has the same benefit.

I decided to document the workaround here anyway because someone might learn something in the process, or be able to use it for some other purpose.  If you just want to know the best solution, skip to 'The Correct Workflow'

Underline Workaround Method

When you first place a schedule on a sheet, you get some pretty uninspiring looking graphics - all boxed in, with the heading text centre justified and the body text left justified.
Default schedule appearance
If you look at the schedule 'Appearance' properties, the default settings show Grid lines on, Outlines off.  Depending on your project template, you may have the same text type for all three aspects of the schedule text - in which case it is wise to create separate text types for title, header and body text, making sure they are named clearly.
Default schedule appearance settings
 You could try turning on the Outline and hiding the gridlines to see if it underlines the title/header.
Outline on, gridlines off
Unfortunately it does not underline either the title or headers - those settings are very crude, giving us very little control at all.  The end result is a box around the whole schedule.
Outline on, gridlines off
The next thing to try is to switch off the outline box, then underline the header text itself.  You could select the header text in the schedule view, and change its font properties
Selected text font properties
However, it is much better practise to use a specific text type for the header and edit the type properties for it - so you can change them all at once without having to select the text in the schedule cells.
Text type properties
The end result is that individual header text words are underlined, which looks awful - we are trying to get one single line under the whole lot.
Header text underlined
How about using the schedule formatting tools introduced in Revit 2014?
  • First edit the Schedule Header text type to remove the underline.
  • Then highlight all the header cells by dragging the cursor across them - this has to be done in Schedule edit mode, not in sheet view.

Select all the header text cells
  •  Click on the Borders icon on the ribbon.
  • This opens the Edit Borders dialog box
  • Select the linestyle you want the underline to be
  • Click on the border box to the lower left with cells underlined
  • Click OK
  • Assuming that you switched off the 'Gridlines' and 'Outline' checkboxes, you still won't see the borders on the header cells (or any borders at all).
  • Enable the 'Gridlines' checkbox, and you get all the gridlines back again (not just the header underline borders.
  • This was the point at which a gap in my knowledge caught me out, so I devised the crazy workaround.  I thought that you could not control the borders on individual cells in the body of the schedule because the Borders icon was greyed out as soon as you select one or more cells - more on that later.

Crazy Workaround

Don't follow these steps!
  • First I created a white coloured linestyle
  • Then set the linestyle for 'Gridlines' to be the white linestyle
  • For this to work it requires the 'Blank row before data' checkbox to be ticked
White line gridlines plus blank row before data
  • Hey presto - the gridlines are there, but you can't see them as they are white on a white screen (of course it won't work if you changed your background colour).
  • The header cells should be underlined because those cells had a black border

The Correct Workflow

This is how you should do it - so much simpler:
  • Set the gridlines linestyle back to something sensible like 'Thin Lines', making sure that 'Gridlines' is ticked
  • What I didn't realise earlier is that you can modify the border lines on all the cells by selecting the columns at the top of the schedule, by clicking on the letters at the top - just like Excel.  Duh!
  • Select all the columns by running the cursor along the row of letters
Select all columns
  •  Click on the Borders icon on the ribbon
  • Click on the 'None' icon
None borders on all cells
  •  Select the Title cell and set its cell borders to None
  • Select just the header cells
Select all the header text cells
  • Click on the Borders icon on the ribbon
  •  Select the linestyle you want the underline to be
  • Click on the border box to the lower left with cells underlined
Underline border
  • Make sure that 'Blank row before data' is ticked otherwise the Header cell underline borders will not show - this is the useful tip I discovered in my crazy workaround that also applies to this method
Grid in headers/footers/spacers
  • Also untick the 'Grid in headers/footers/spacers' checkbox otherwise you'll get vertical gridlines in the blank row (as above)
Appearance formatting
  • Select each column and change its horizontal alignment as you require
Align columns
  • Finally you should get the desired result
Underlined headers
  • If you want to have some fun you can shade alternate columns.  I don't believe there is a way to shade alternate rows, which is something people do in Excel occasionally.
Alternate columns shaded

The moral of this tale is that we now have two different ways of controlling the gridlines on Revit schedules - they do not work well together.  Basically you can opt not use the old controls unless you want very simple formatting that happens to match the old options (All gridlines or just an outline box).  If you want to use the new border tools then you need to make sure the old gridline checkboxes are set to the default settings (as shown above).

Tuesday, 3 January 2017

Separating Model and Detail Lines in Revit - part 3

Previously I posted descriptions of how to distinguish between model and detail lines in Revit and part 2 - using View Display Model .   These various methods demonstrate how to visually distinguish between model and detail lines - but not how to just select one or the other.  As previously described, you cannot use the Revit selection filter to separate the lines - it does not distinguish between model and detail lines, although it does separate by family type.

Revit selection filter

Add-Ins for separating model/detail lines

The solution to this is to use a Revit Add-In product.  My favourite is 'Ideate Explorer', which is robust and fairly comprehensive:
'Explorer' is a tool for model-management and auditing Revit projects - but is also very useful for finding objects, be they hidden or just not easy to identify using standard Revit tools.  One of the things it does is clearly separate model and detail lines in a selection, active view or even the whole project.
Filter by current selection

Select by Active View or Entire Project

Once you have narrowed down the filter to just the detail lines (if that is what you want), they are now selected so that you can now deal with them.  In the example below, detail lines have been used to indicate a floor penetration, which is a serious Revit misdemeanour!  They need to be replaced by a 'Shaft Opening' object.  However, that would mean recreating the dimensions - so if your drawing needs to be issued in the next 5 minutes, the least you could do is convert the lines to model lines using the 'Convert Lines' tool.


QuickSelect

Ideate Explorer is somewhat overkill for such a simple task, so from this year you can now use a sort of cut-down version called 'Ideate QuickSelect' - this just allows you to select or filter specific items in a similar fashion (by current selection, active view or whole project), without having any capability to further analyse the elements.
Ideate QuickSelect

These tools are great for finding other things that should not be in your model such as images or imported DWG files that have been placed and hidden on views - Explorer tells you which views they are on.  In that situation, when a view containing hidden items is duplicated with detailing, the hidden items are duplicated too, and remain hidden, which can rapidly lead to project file-size bloat.  One improvement to 'Explorer' would be to display the file size of imported DWGs and images.