Most recent threads @ RevitForum.org

Showing posts with label Families. Show all posts
Showing posts with label Families. Show all posts

Friday, December 3, 2010

Void visibility with Yes/No ?

This is one of the questions that I get a lot - Most would say that the answer is no, since there´s no build-in "Visible" parameter for Voids, as the case is for solids.

But if you follow a few simple steps, the answer is actually YES - It CAN be done :-)

1. Create two extra ref. planes to control the void height (or depth, or whatever you´re after)
2. Lock one of those to a given distance from the solid (in this case 500 mm´s)
3. Dimension and label the distance between those two ref. planes (Length parameter names "Void Height"
4 Create the Void, and lock the top and bottom to the two ref. planes.
5. Create a new "Yes/No" parameter named "Void Visible" and assign this formula > if(Void Visible, Solid Height + 500 mm, 500 mm)

In the above example, I´m assuming that you need to cut all the way thru a solid with the height parameter "Solid Height"

Actually, a Revit family speaks more than a thousand words - so just grab this example.rfa , and make of it what you can.


Friday, February 26, 2010

Incremental Values

When building Revit families, it´s quite useful to be somewhat in control of the user inputs... for instance, doors come at certain width´s, it could be 810, 910 ,1010 mm´s or 3-0"´, 3-6", 4´-0" etc.

You´ll need a few parameters:

User Dim (Length) - What the end user is gonna use
Increment (Length) - 100 mm/6" - Not neccecary, it could be a fixed value in the comming parameters
Integer (Integer) Formula = User Dim / Increment
True Dim (Length) Formula = Integer * Increment

Now, just dimension your geometry/ref. planes with the True Dim parameter

Note 1: If needing the scandinavian standards of 810, 910 mm etc. ? just add + 10 to the True Dim parameter: = (Integer * Increment) + 10
Note 2: If you want to control how User Dim gets rounded up, or down just add either +0.49 or -0.49 to the True Dim parameter: (Integer * Increment) + 0.49 or (Integer * Increment) - 0.49

Childs cutting their Parrents...

Not really a nice topic, but quite usefull when speaking of Revit Families.
I´m repeating myself, from a post at the AUGI forums - But if you want a child/nested Revit family to cut a hole in the parrent/main family, like when placing a sink in a countertop, you´ll need to follow these instructions:

A: Sink family
1. New family, using the Generic FaceBased template....
2. Change the new family to the Plumbing Fixtures Category, (and share it)
3. Model the sink, and create a void, to representate the hole in the countertop.
4. Use "Cut Geometry" to cut the "Face" from the template, with the new void.
5. Save to library as desired.

B: Countertop family.
1. New family, using the Casework template...
2. Model the countertop as needed.
3. Load the above sink family, and place it on your new countertop face
4. Save again, and have fun :-)

And then again - we could take it one step further... when the sink is placed in the countertop family, pick it, and add a label to it, now you´ll be able to switch the sink famlily and/or type from within the countertop family, even when loaded into a project.

Monday, November 9, 2009

Placed components override wall lineweights

Had a question today, regarding components which would override the lineweight of the walls they where placed up against.












The solution:
1. Open the component (family) in the family editor
2. Locate the build in masking region
3. In the element properties of the masing region, uncheck the "Draw in Foreground" box
4. Hit "OK"
5. Create a new Ref. Plane, just above the Ref. Level, and name it "Mask"
6. Select the masking region, and set it´s work plane to the new "Mask" Ref. Plane
7. Load the component into your project.

Saturday, November 7, 2009

Formula to return the highest value

For the family builders, here´s a quick trick to return the highest of three values (user inputs)

We need something like the following parameters:

Length A (User input)
Length B (User input)
Length C (User input)
Calc (Only used to get our final result)
Return Length (Returns the greatest of the three length parameters)

The formulas needed goes like this:

Calc = if(Length A > Length B, Length A, Length B)

Return Length = if(Calc > Length C, Calc, Length C)


Download the sample family from HERE

Edit:

While talking about this topic at the Augi Forums, Joe Zhou came up with this genius formula (The result is the same, but you won´t need the "Calc" parameter...

Return Length = if(and(or(Length A > Length B, Length A = Length B), or(Length A > Length C, Length A = Length C)), Length A, if(and(or(Length B > Length A, Length B = Length A), or(Length B > Length C, Length B = Length C)), Length B, if(and(or(Length C > Length A, Length C = Length A), or(Length C > Length B, Length C = Length B)), Length C, 0 mm)))

OK... the formula itself is a nightmare, but it WORKS !

Saturday, October 31, 2009

Controlling user inputs in families

When building Revit families, and wanting to avoid nightmares, it may be useful to be in control of the user inputs. It could be a door that can´t be made if it´s more than 1200 mm´s (4´-0") wide.

Now, there´s a couple of ways to aproach this, but only one of them will actually tell the user that the input is not acceptable, I tend to combine two methods - 1. Warning & 2. Control

Warning Method

For this we need a custom parameter (yes/no) called "Width Warning", with a formula like this

not(Width < 1200 mm)






Now, create some model text, with a warning to the user - choose element properties for the model text, and aply the "Width Warning" parameter under "Graphics > Visible"







Now, if a user inputs 1200 mm´s or more as the width, the model text will show, and tell the user to correct the problem.

Control Method

It´s also possible to control the input, just in case that the user chooses to ignore the warning.

Create a new length parameter called "Controlled Width" and ad a formula like this:

if(Width > 1200 mm, 1200 mm, Width)




Now change the label for the current width dimension, to the new "Controlled Width" parameter.

Now the user get´s  a warning, and the door keeps a max. width of 1200 mm´s, even if the user input is greater than 1200 mm´s.









Download the example Door family