BILT Speaker

BILT Speaker
RevitCat - Revit Consultant
Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Monday, 5 August 2019

Using Count Parameter in Revit Schedule Formulas

Anyone who has tried to master Revit Schedules would have encountered all kinds of limitations.  One of those is the limitations on which parameter types can be used in a calculation:

These parameter types can be used in formulas:
  • Number
  • Integer
  • Length
  • Area
  • Volume
  • Angle
  • Yes/No
  •  <Family Type..>
  • etc
They are all basically a number or a choice between items that have a number hidden behind them (Y/N  or <Family Type..>

The following parameter types cannot be used in formulas:
  • Text
  • URL
  • etc
They are some kind of text, which is all too hard for Revit to cope with (poor little Revit).

There is another kind of schedule parameter, which is not listed above (because it is a system parameter that you cannot choose from a list of types): 

        "Count", which is just a number (always = 1 for each item).


However, if you try to use this in a schedule formula, Revit gets very uppity and says you cannot.


This is unprecedented in Revit - a message that actually explains why it can't do what you want!
  • In case its not obvious what this means, it is referring to when you uncheck "Itemise every instance" under the Sorting/Grouping tab.

However, it is quite likely that you do actually want to perform a calculation on the combined result when multiple elements appear on the same row.  If not that, you may want to calculate per item and then total up the results of your calculation.  Here is my workaround:

Count Dracula Formulas

In your schedule, you can create your own "Count" parameter:
         a Calculated Value with a formula = 1

You could call it "Dracula", but that might confuse everyone later, so its better to use something more prosaic like "MyCount"
MyCount formatted to No Calculation

Don't forget to format your Count Dracula parameter to 'Calculate Totals' otherwise it will list only 1 even for multiple elements per row (as above).
MyCount formatted to Calculate Totals

Once you have 'MyCount' working, you can include it in a formula:
  • You may have a numeric parameter - say 'Num Shelves', which represents the number of shelves in a unit.
  • This can be multiplied by your Count parameter in a new 'ShelfCount' calculated value

Revit is quite happy to include "Dracula" or "MyCount" in the formula even though it is doing the same job as the system parameter 'Count'.

The formula could include an if statement:

Or you could put a formula directly into your 'MyCount' parameter

NB  . The last two formulas were somewhat superfluous, but just shown to demonstrate that you can create formulas with your own Count parameter.  For a more realistic example, refer to my previous post on Hiding Zeros in Schedule Formulas

This workaround removes one of Revit's many limitations - the programmers obviously put that one in deliberately to prevent "wrong workflows", but in reality they didn't anticipate all our requirements with schedule formulas. [Yes, my spellchecker doesn't like "formulas", but then I never liked learning Latin, so I'm not changing it!]

For more information about Revit Schedules, refer to this index of Schedule blog posts
 

Friday, 16 November 2018

Correcting the CL symbol in mirrored Revit links

The automatic 'Centreline' capability on Revit dimensions can be really annoying when they pop up unexpectedly.  But when you actually need them it is very useful to be able to just change a property of the dimension family to make the CL symbol appear.

I have seen people just placing many instances of two little pieces of overlapping text, one being C, the other L - all because they didn't know about this feature.  That is criminal!  And its a nightmare when dimensions need to be adjusted.

Mirrored Centreline Dimension Symbols

What happens when you mirror the elements and dimension?  In most situations, Revit handles it perfectly well, because the CL is a symbol family, and Revit automatically corrects the symbol orientation.  However, there is one situation where it does not work:
  • If the dimension is in a linked Revit file that has been mirrored - normally you would not see the annotation in the linked file, but if you set the view properties for that link to be 'By Linked View', then the dimensions in the mirrored linked file become visible.

  • In this situation, the symbol may not be displayed correctly, depending on how the symbol family was created:
CL symbol in Mirrored Link
  • The OOTB centreline family is actually made up of arcs and lines (not text) - this symbol does not display properly in mirrored linked files.
I was recently asked to solve this problem, so I searched high and low for settings in the dimension and in the symbol family that might solve this.  I found nothing.
  • Next I tried converting the symbol from lines to actual text in the family - I'm not sure why it was originally done as lines anyway?
  • This needs to be made up of two pieces of overlapping text - in the symbol family, not the project file.
  • In this example I made the text using a font that was clearly not lines - 'Algerian' was the first suitable windows font that I found, to make the demo clear.

  • In the original file it looks fine, as expected.
  • Once I looked at it as a mirrored linked file, another problem showed up:
  • Each letter was displayed correctly, but displaced sideways

  • Aha, it must be the text justification, I thought.
 
  • But no, that made no difference whatsoever when I tried centre, left or right Horizontal Align.  Revit is just mirroring each piece of text around the symbol centreline, then flipping the text back again around its own axis.

Weird Workaround

So what was the solution?
  • Edit the text in the symbol family - Put a space after the C and one before the L.
  • Shift the letters accordingly. 

  • It wasn't perfect to start with, so I had to shift the text around a bit, or add a second space after the L


Weird behaviour in Revit requires weird thinking workarounds!

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).

Monday, 25 July 2016

Revit Stair Path Arrows at Different Scales

My blog post on Revit Stair Path Arrows has had more hits than any other topic; and it continues to be near the top of the list each month - so it is obviously a problem issue for many people.

One thing I did not really cover in that post is how  to handle stair arrows at different scales.


Stair Arrows and Scale


Stair path arrow types need to be set up for each different scale that you want to use – because the arrowheads behave like symbols or tags (they change with scale); this is unlike the old arrows, which behaved like model lines (not affected by scale).

Arrowheads

First you need to set up the arrowheads for each scale:

  • 1:50 or 1/4” to 1’0”

  • 1:100 or 1/8” to 1’0”

  • 1:200 or 1/16” to 1’0”



Text Size


Make sure you have suitable text types set up for each required stair path arrow scale



 


Stair Path Arrow Types

Then set up a different Stair path arrow type for each scale – these will reference the preset arrowheads and also text styles:

The important things to change for each scale are:
  • Arrowhead Type (system families as described previously)
  • Distance to Cut Mark – I usually make this a calculation of “Tread depth/ Scale factor”, so that the arrowhead stops on the first riser line beyond the cut mark, if that is what you prefer graphically.
        250/50 = 5mm
        10” / 1/4” to 1’0” = 27/128”
        250/100 = 2.5mm
        10” / 1/8” to 1’0” = 27/64”
        250/200 = 1.25mm
        10” / 1/16” to 1’0” = 7/128”
  • Text Type – adjust this so that it is the smallest readable size (unless you want larger text). Set up from Text panel of Annotate tab on ribbon




Duplicate types for each scale, and change the 3 properties:
  • 1:50 or 1/4” to 1’0”


  • 1:100 or 1/8” to 1’0”


  • 1:200 or 1/16” to 1’0”


Things that typically do not need to be changed include:
  • Start from Riser &  End at Riser   - unticking these would cause erroneous locations for arrowheads if your stair starts or ends with a tread (but will not affect stairs that start/end with runs).
  • Show Arrowheads to Cut Mark    - causes arrowheads to disappear on views where cut marks are shown (but they still show when the full run is displayed)

Properties that you might want to change include:
  • Start Symbol Type   - if you want to put a dot or circle to indicate the start of the stair
  • Full Step Arrow   - makes the arrow the full width of the run
  • Line Shape at Landing Corner   - can be straight or curved on angled landings
  • Draw for Each Run   -  creates a separate arrow on each run, which may be useful on unusual stairs such as 'T' shaped stairs where the path arrow is not created correctly:





Refer to Revit Stair Path Arrows for more information on using stair path arrows