BILT Speaker

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

Monday, 19 August 2019

PS - Update on Hide Zeros in Revit Schedules

Following on from my previous post about Hide Zeros in Multi-Element per Row Schedule, here is a simplified version of the schedule formulas - as noted in a comment by Kovyljan.

. . . . . When using the percentage formula, we can cut out one calculation field by changing which field the percentage is taken from:
"Schedule Count" instead of "MyCount" - since both of them have a value of 1 (or 0/Blank) when the schedule is expanded.

  • The 'MyCount' formula can then be changed to take on the role that 'MyCountTotal' had in my previous version:
    if(Schedule Count / MyPerc = 0, Blank, Schedule Count / MyPerc)

  • Make sure that 'MyCount' is formatted to not calculate totals - otherwise you'll get totals of totals per room.
 

  • Hide the 'Schedule Count',  'Blank' and 'Count' columns (Count is only required for checking anyway)
  • Rename 'MyCount' to whatever you need.

For more detail on this technique, refer to Hide Zeros in Multi-Element per Row Schedule
and Using Count Parameter in Schedule Formulas

Friday, 9 August 2019

Hide Zero Values in Multiple Item Rows in Revit Schedules

Hide zero values in schedules (Previous post)


Following on from a previous post about how to Hide Zero Values in Revit Schedules, I have noticed that it does not work when you untick 'Itemise each Instance' (Multiple items per row) and you set the formatting to calculate totals - the zero returns.

Calculate Totals - Zeros shown
In the example above, you probably would want to show the zeros when calculating totals of different numbers - but there are situations where you legitimately do not want to show the zero.  Here follows an example, and yet another workaround to solve that problem.

Example of Workflow

A situation where you may not want to show the zeros might be when the field is a count of items.  As demonstrated in my previous "Count Dracula" post, it is not possible to include the system parameter 'Count' in a Schedule formula; nor is it possible to make a 'Count' value of zero - the workaround to that problem is to create your own 'MyCount' parameter, as described previously.

In this example,  items are to be listed in a schedule with consecutive room numbers - at this stage some of the rooms do not yet have any real items placed in them.  The schedule needs to show all the room numbers, even when not yet furnished.   In order for the rooms to appear in the schedule, a dummy item has to be placed in the room, but we do not want it to be formally counted.
This is where a 'MyCount' parameter is useful, as the dummy items can be forced to schedule with a count of zero.
  • First a 'Schedule Count' parameter has to be created for the nominated categories
  • Set the value to 1 for all items to be counted
  • Set the value to zero for those not to be counted
  • [NB. This could be a Y/N parameter, but that has complications - to be dealt with in another blog post]
  • If it does not yet exist, create a 'Blank' calculated value, with no formula
    (Refer to Hide Zeros)
  • Then create a 'MyCount'  calculated value (Number or Integer)
  • It can be given a formula of:
    if(Schedule Count' = 0, Blank, Schedule Count)

  • The schedule should list a 1 MyCount value for each item to schedule, and nothing for those Spare (dummy) items.

  • Group the schedule by Room Number (no footers)
 
  • Untick "Itemise every Instance"
  • Notice that the MyCount total values are not totalling up
  • Format 'MyCount' to calculate totals
  •  Untick "Itemise every Instance"
  • Aaaargh!   The zeros are back

Workaround

In order to get the number of items in each room to total, you have to add a couple more calculated values - this is where it starts getting crazy!
  • Add another Calculated Value 'MyPerc' or 'MyPercentage'
  • Make it a Percentage (not a formula)
  • Select the field 'MyCount' of which it is to show a percentage
  • Select the Grouping title - 'Room Number' (rather than Grand Total) - so it only calculates a percentage of that Room sub-total

  • Add another calculated value, with a formula:
    if(MyCount/MyPerc = 0, Blank, MyCount/MyPerc)

  • This will show the total count per Grouping (Room) in each row - which looks a bit crazy when each row is listed separately

  • Untick 'Itemise every instance' and it looks better - and without the zeros
  • Do not Calculate Totals for these two calculated values, otherwise it gives wrong totals

  • Hide the intermediate calculated values, and rename the 'MyCountTotal' as desired

Now, if you actually want to show Grand Totals for the Item Count, that is another story . . . .
  • You would probably need to create another schedule that shows 'MyCount' (which gives the correct total), but collapse it down to one row (no sorting/grouping; no grant total) - and align it on a sheet with the column for MyCountTotal.
  • That would also enable you to have bold text for the total
  • However, I am not going to try that here - you are on your own.
[Edit.  A comment from Kovyljan has pointed out that the last method above can be simplified by making the percentage calculate on 'Schedule Count' instead of MyCount - refer to ps Update on Hide Zeros ]

For more information on this technique, refer to an earlier post on using Totals in Formulas *
For more information on creating your own Count parameter

* Thanks to Martijn de Riet of BIMForce who initially posted on his blog a similar solution to another scheduling problem in Revit

Thursday, 1 August 2019

Hide Zero Values in Revit Schedules

Revit likes to show a '0' or '0.00' in a schedule when the value is either zero or blank (sometimes).  This is not always desirable - in some situations you may actually want the schedule to show nothing when the value is zero.

There is a way to do this, although it is not in the units or display settings . . . . .

Blank Value Workaround

Let's suppose you have a 'Numeric value' field that is displaying zero values
  • The first thing to do in your schedule is to create a new Calculated field called 'Blank' (for example) - make it a Number type (if that is what your desired type is)
  • Do not put anything in the formula

  • Create another Calculated Value field - in this example I've called it 'Hides Zeros', but it can be whatever you want the title to display in your schedule
  •  This time give it a formula something like:
    if(Numeric value > 0, Numeric value, Blank)
  • This will hide all zero and negative values


  • If you want to display negative values and only hide the zero values, change the > in the formula to =:
    if(Numeric value = 0, Blank, Numeric value)

  • The next step is to hide the intermediate calculation columns:
  • Go to the Formatting tab and make the 'Numeric value' and Blank' columns hidden


Multiple Elements Per Row

What happens when you have a schedule that displays multiple elements per row, when you have unticked the grouping setting 'Itemise every instance'?
The zeros may return!
In which case refer to this post on Zero values in multiple elements per row Schedules

Monday, 9 June 2014

Zero Length Lines in Revit Are Possible

I always learn something new about Revit at RTC - and RTC Australasia 2014 in Melbourne was no exception.
This time I learnt two new Revit Repeater tricks - both from Helen Gorina from the NY office of Perkins+Will, in her Lab "Applying Math and Logic to Facade Design".  These tricks have led me to understand more about adaptive components and repeaters.

Schedule Panels on a Facade

The first trick I picked up during a description of how to automatically schedule facade panel column and row numbers.  This was done using Repeaters on a divided surface - using adaptive component "Jigs" as a series of locators placed on the divided surface nodes.  Each of these jigs had several adaptive points linked with model lines and reporting parameters used to track the X and Y locations of the components on the grid.

Last year I posted a similar technique for scheduling column/row numbers that involved a lot of trigonometry - this was done with a single repeater across a rectangular panel.  Helen's technique is a lot simpler and more elegant, and involves far less maths - it requires creating separate repeaters for each row (so it is perhaps less flexible if the grid changes).  In order to direct Revit to create a repeater in one direction along a row of divided surface nodes, you need to place two adaptive components in a series - as I have described previously (see diagram below).

 

When you have multiple point adaptive components, Revit will only place repeater elements  where it has a suitable series of adjacent nodes.  This often means that you get missing edge conditions on the repeaters.
Sample 2 point repeaters from my previous blog posts
If you want the series of components to be of different lengths, as this technique requires, you need to place the two initial adaptive components appropriately to indicate the relative change required
For the scheduling technique, you actually need the first adaptive component in the series to have a zero X value so that it knows it is in the first column.  So, what Helen did is to place the reporting "Jig" component with two of its adaptive points (measuring X distance) placed on the same node;  the second adaptive component was placed on adjacent nodes, so that its X distance measured one column width.  I am not describing Helen's technique in full here - you'd need to attend RTC for that.  What I am interested in here, is that in learning this new trick of coincident adaptive points to generate a zero length reporting parameter, it became apparent that Revit is doing something I thought impossible . . . . .

Zero Length Lines

If an adaptive component has multiple adaptive points, and those points are joined by model lines or reference lines, you would think that when you use the adaptive component, Revit would not let you place the adaptive points in the same location because that would mean zero length lines.   You would think wrong!  Revit allows this without a squeak of complaint.
Revit most assuredly does not allow zero length lines in traditional families - they break when you try to place them such that line length gets too small.

If you have solid forms attached to the lines or adaptive components, then Revit will not allow zero length lines where that would mean zero length edges - it breaks as you would expect.

This is an interesting Revit inconsistency that you can use to your advantage when you want to be able to report zero lengths (and base calculations on them).

I'll talk about the second trick I learnt in the next blog post on Repeater Instance Parameters