BILT Speaker

BILT Speaker
RevitCat - Revit Consultant
Showing posts with label instance. Show all posts
Showing posts with label instance. 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

Monday, 7 January 2019

Weird Railing Stuff - part 15 - Railing Lateral Offsets

I started out writing about the 'Handrail Hand Clearance' property of Railings in Revit - then I realised that it would involve analysing all of the related lateral offset properties associated with Railings and each different component.  It turns out to be a real "dog's breakfast", with at least six different ways to offset railing components, with minimal consistency between them all.  So I decided to document that first before looking at how it all affects 'Hand Clearance'.
Colour coded railing sub-elements
The above view of a railing is colour coded to help distinguish each sub-element; it is set at an oblique angle so that offsets are clear to see in the following examples with exaggerated offsets of 500mm.

A Dog's Breakfast

Railing Sketch line.

When a railing is placed automatically on a stair, it has a sketch line, that is typically on the edge of the run/landing.  All railing lateral offsets relate back to this sketch line location.

1.  Offset From Path


This is an instance property, which is applied to the whole railing and all its sub-elements.  
It represents a notional centreline of the railing, offset laterally (sideways) from the railing sketch line, which is placed on the edge of stair runs and landings by default.


Unfortunately there is a built-in system default value of 25.4mm, which is one inch.  The logic to this is obscure - it only works if your top rail happens to be 50.8mm (two inches), and where the face of the top rail needs to align exactly with the edge of the run/landing.  Why is this so bad?
  • This never, ever works in the metric world (all but two countries in the world) - even if we have a 50mm top rail there is still an 0.8mm discrepancy every time; Occasionally it might suit a situation in the imperial world, as described above;
  • This never works when the stair abuts a wall (metric or imperial) - see what happens to supports later on.

This default value is infuriating - as you have to correct every single stair railing after placement.  In my opinion it should be a default that we can control in some way (either a 'last placed' setting or in the Revit.ini file);  alternatively it should be a Type property rather than instance.  Please vote here on Revit Ideas if you agree with me - if this blog has helped you out, then please help me out by voting.

2.  Old-Style horizontal rails


The old Type Property dialog box for horizontal rail structure has a separate 'Offset' property for each rail element.  This does not used the word 'lateral' anywhere on the dialog box, so you have to guess which of the three possible directions it will offset (x, y or z), as well as which is positive or negative.

3. Baluster Placement (Individual Balusters)


The Baluster Placement dialog has a separate 'Offset' property for each baluster element.  This does not used the word 'lateral' on the dialog box, so you have to guess that it is a lateral offset property - although there are also Base and Top offsets, so it is easier to identify.


Warning:  This individual Baluster Offset property goes in the reverse direction to most other offsets:  A positive value pushes the baluster outside the stair, while a negative value goes in towards the stair - this is inconsistent with most other railing offsets.

4.   Post Placements

Railing posts are similar to Balusters (with the same reverse direction offset)

5.  Baluster Offset (and Top/Handrail)

Back in the Railing Type Property dialog box, there is another property called 'Baluster Offset' - another guessing game ensues.

This can give very unpredictable results.  It will laterally offset all of the balusters by the same amount;  it does not affect the horizontal rail structure.  With the old style railings, it was confusing enough because the individual Offset goes one way, and the overall baluster offset goes the other way. However, with the new style railings* it is almost incomprehensible :
  • The balusters will all be offset laterally by the same amount.  Unless . . . .
  • If an individual baluster offset value has been applied, it is cumulative, so the individual is added to the master baluster offset property (bearing in mind that a positive value for one may cancel out a negative value in the other).
  • Old style horizontal rails will not be affected (they get left behind).
  • New style 'Top Rails' will be offset.
  • New style 'Handrails' will be offset.


The net result of all this is that the Baluster Offset property may work as a Type control offset for the whole railing, provided that you don't have any old style mid rails - in that case you have to offset each of those in the Rail Structure dialog box.

* New style railings were introduced from Revit 2013 onwards, but old style railings were not automatically upgraded - only if you've swapped to the new style railings!  You may still have old-style railings in your projects.

5A.  Rest

Are you still following all this?   If not, (or you have a headache) just have a rest or lie down for a few minutes, before moving on to the next one.  I can't say it gets any better . . .
Deconstructed Railing

6.  Handrail

New style railing Types have handrail properties - these include "Lateral Offset" for each handrail, which are greyed out. 

The Lateral Offsets are calculated by the system, depending on the Handrail type properties.  This represents the offset of the Handrail centreline from the notional Railing centreline (which is in turn affected by the "Offset from Path" property . . .)
Refer to Rail Hand Clearance Property for how this is calculated.

If you change the 'Hand Clearance' property it will move the centreline location of the Handrail relative to the overall Railing.
  • This has to be done in the Handrail Type properties dialog box, not in the Railing properties.

7.  Right Handrail

The above example assumes a handrail is set to 'Left' Position.  If it is set to 'Right', the whole handrail is mirrored and offsets outside the stair.

8.  Top Rail

Top Rails also have a 'Hand Clearance' property, but unlike Handrails, this is not displayed as a Lateral Offset in the Railing Type properties.


The Hand Clearance property of of the Top Rail most assuredly does affect its Lateral Offset - so it would be mighty useful to have that property displayed, even if you want the Lateral Offset to be set to zero most of the time.

Why oh why is it missing?


One possible reason it is missing might be that the offset direction is the opposite to Handrails - a positive Hand Clearance on a Top Rail would give a negative Lateral Offset.

9.  Sketch Offsets

I would not be surprised if there are other Offset properties that I have missed.
There is at least one more way to move Railings, aside from playing with the properties:
  • Edit the stair sketch and 'Offset' the sketch lines from their original location.
  • I would not recommend doing this on stairs without good reason, as it would make the properties even more confusing.
  • If the sketch lines go outside the run or landing (laterally), you would most likely encounter hosting and height problems - so that is not advisable.


If you are confused by all this, it is hardly surprising.  I will try to shed some light on how to manage these offset properties in future blog posts. . . . .


Monday, 19 June 2017

Global Parameter Enhancements in Revit 2018




I recently did a presentation on ‘Global Parameters’ at BILT ANZ 2017 in Adelaide.  I listed the two updates in Revit 2018 related to Global Parameters – one a bug fix, and the other being support for radius and diameter dimensions.  At the time I suggested that this was not a particularly interesting enhancement, and that I could not think of any particular uses for it.  However, in discussions with Frank Crisp of KTA (in Sydney), he came up with a brilliant idea for how to take advantage of this feature – so I have tested the idea and made a working example as follows.

Curved Curtain Walls

Everyone knows that Revit cannot do curved curtain walls – or at least the walls can be curved but the panels are flat, so that you get segmented curtain walls. 


In some situations this can be appropriate, but if you have enough budget for this, it may be desirable for the panels to curve too.  Some years back I created a curved curtain panel family but it was very clunky to use, and you had to manually match the radii of the wall and the panels.  Frank and I have now worked out a method to use global parameters to keep the radii in sync so that you don’t need to change the panel radius if the wall radius changes.  I have also improved my curtain panel family to make it much simpler to set up and to modify, as well as putting in some check formulas.

The Panel Family

My original curved curtain panel family had a series of reference line arcs in plan, running between the sides of the panel – one each for centreline, front and back of glass (and for any transoms).  These were used to define the outlines of vertical extrusions.  This was quite fiddly to set up and I have since learnt that it is much better to use sweeps for defining such geometry – this means that it is only necessary to draw one curved reference line to be used for the sweep path in plan.  All the sketch (or profile) geometry is drawn at the midpoint of the arc in a left or right view.  This means that an additional reference plane needs to be placed in plan at the furthest offset from the baseline or chord of the arc – this is used to host the profile sketches and it moves relative to the chord baseline depending on the radius of the arc and the length of the chord.
A formula is required to calculate this offset from the chord baseline – this dimension for the height of an arc above the chord is called a ‘Sagitta’.  Using Pythagoras’ Theorem it can be easily calculated from the chord length and the arc radius.  The radius is defined as the hypotenuse of the triangle (long side) while half the chord length forms one of the short sides (B).  The other short side (A) is calculated:
A = Square root of (C squared – B squared)
In Revit this formula is written as
A = SQRT(C ^ 2 – B ^ 2) 

The arc height (Sagitta) is simply the Radius (C) minus the short triangle side (A), so the overall formula is:
Sagitta = C - SQRT(C ^ 2 – B ^ 2)
where
B = Chord / 2
C = Radius


A few check formulas need to be put in as Revit does not like to calculate square roots of minus numbers, nor to have the radius equal or less than half the chord length.
The Radius parameter can be changed to ‘Radius desired’, which is the input value;  A new parameter ‘Radius actual’ checks the input value for anything less than or equal to half the chord length:
Radius actual = If(Radius desired > Chord/2, make it the Radius desired value, otherwise make it
the value ‘Chord/2 +1mm’).


In the Project

This curtain panel family can be loaded into a project and used in a curved curtain wall.  Initially the radius of the panels have to be manually set to match the radius of the wall.

If the wall radius is changed, the panel radii will be wrong


A curved wall does not automatically have a system property for Radius, so you need to add a dimension.



This dimension can then be associated to a global parameter but it must be a ‘reporting‘ parameter, so that all it is doing is getting the radius information from the wall element and pushing it back into the parameter for use elsewhere.
 


The curved curtain panel family can then have its radius matched to the curtain wall.  The ‘Radius desired’ property of each panel needs to be associated to the reporting parameter Radius of the wall.   

Alternatively, you can create a new global parameter that will represent the curtain wall radius if you need any calculations based on the reporting parameter.




Type vs instance

Depending on how you want to use the panels, the ‘Radius desired’ property could be either instance or type.  If you want to define the curved curtain panel as the default panel for this particular curtain wall type, then it must also be a type property.
If the curved curtain panel family Radius property is a type property, then you would need a panel type for each particular curtain wall otherwise it may break.  As a type property you only need to set it once regardless of how many panels you have in the curtain wall.

If the curved curtain panel family Radius property is an instance property, then you only need one panel type.  However, you need to associate the radius to the global parameter for each panel, which means extra work whenever the number of panels changes.




Warning: if you delete a radius dimension with an associated global parameter, it does not ask you if you want to remove the constraint.  This means you could end up with hidden constraints.