Multiple direction parameter

Multiple direction parameter

KraiggC
Advocate Advocate
4,230 Views
18 Replies
Message 1 of 19

Multiple direction parameter

KraiggC
Advocate
Advocate

I have a family that is going to be moving about a pivot point. One of the components need to move up and down from 0. What parameter do I use for this? Up is easy, but down is a negative dimension so clearly revit isn't very happy about that.

0 Likes
Accepted solutions (1)
4,231 Views
18 Replies
Replies (18)
Message 2 of 19

barthbradley
Consultant
Consultant

There's several ways to do it. It depends. But, one way that might work, would to have 2 additional length parameters; one positive and one negative, and an on/off parameter to control which one to use to drive the geometry.

 

 

Length Parameter 1: = user enters offset value (positive) 

Length Parameter 2: =(-Length Parameter 1). The offset value returned will be negative Length Parameter 1.  

Length Parameter 3: =(if(On/off Parameter, Length Parameter 1, Length Parameter 2). This parameter is associated to the labeled dimension that drives the geometry up or down depending on the condition (check or unchecked) of the On/off Parameter. 

 

On/off Parameter: User checks box if element uses negative offset value (Length Parameter 2).

 

 

Like I said: it depends on how you built the family. If you can post the family, we can give you a sure suggestion. 

0 Likes
Message 3 of 19

KraiggC
Advocate
Advocate

That's what I'm working on now. Of Course having two of the components isn't as ideal as moving a single one up and down. Maybe one day. However I can't find out how to use the yes/no within an "If" parameter. Do you have an example syntax?

0 Likes
Message 4 of 19

barthbradley
Consultant
Consultant

Need more info: what does the on/off do? What condition does it evaluate? 

0 Likes
Message 5 of 19

KraiggC
Advocate
Advocate

I've attached what I was trying to achieve. Just wish I could do it with I single component.

0 Likes
Message 6 of 19

barthbradley
Consultant
Consultant
Accepted solution

I'd just use just one Surgery Swing Arm and associate it's Offset Instance Parameter to the Host Parameter that controls its up and down movement. Make sure the Surgery Swing Arm is hosted to the Ref. Plane -- and that it reads 0'-0" when at the Ref. Plane. 

 

 

...Attached family shows what I am describing in my first post. The parameters I added are grouped under "Model Properties" category. 

 

 

...One other thing: if you use my approach, change the "Offset Distance_Negative" parameter formula to:

 

"if(1 < 2, -(Offset Distance), -(Offset Distance))".

 

This way the value will be grayed out so it cannot be accidentally changed.  

Message 7 of 19

Alfredo_Medina
Mentor
Mentor
  • From an elevation view, draw a reference plane, at a fixed distance ("A" in the illustration) that represents the lowest possible elevation of the object.
  • Then create another reference plane, and name it, anything, such as "Bottom of piece". (Measure from ref. plane to ref. plane).
  • Then, dimension the distance between the "Bottom of piece" reference plane, and the reference plane at the fixed lowest elevation. Make that distance a parameter ("B" in the illustration). 
  • Now from a plan view, place the piece (a work-plane based nested family). Then select the piece, do Edit Work Plane, and choose the "Bottom of Piece" reference plane. 
  • Now, change the value of "B" and the piece will move "up" or "down" in regards to the reference level or origin. The value of B will always be positive. That "B" is the only parameter that is needed. The illustration shows the piece at different elevations.

 

 

 

2017-12-08_20-15-16.jpg


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Message 8 of 19

barthbradley
Consultant
Consultant

Attached is 2016 version. 

0 Likes
Message 9 of 19

Alfredo_Medina
Mentor
Mentor

5 parameters to move that piece up and down? 


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 10 of 19

barthbradley
Consultant
Consultant

@Alfredo_Medina wrote:

5 parameters to move that piece up and down? 


Sure, why not? Besides, only 2 of the parameters require user-input.

 

Seems to me that your method would also require 5. One to indicate what direction the component moves in relationship to the Ref. Level (Up or Down). One for the distance it moves in relationship to the Ref. Level. One to calculate the actual distance it moves, by subtracting or adding the arbitrary default offset it is from the Ref. Line. And, lastly, one for the arbitrary default offset itself. 

 

No? 

0 Likes
Message 11 of 19

KraiggC
Advocate
Advocate

Nothing Special was actually needing to be done. I just forgot about the offset parameter built into families. So the offset label was the height formula. Whether the solution is negative or positive the family moves as intended. Thank you again for all your help and input.

0 Likes
Message 12 of 19

barthbradley
Consultant
Consultant

Sure; just use a minus sign. That works too. 1 parameter. 

 

...that must be what @Alfredo_Medina was alluding to. 

0 Likes
Message 13 of 19

KraiggC
Advocate
Advocate

No need for any extra work. Just create a parameter to control the vertical movement and apply it directly to the "Offset" Parameter.

0 Likes
Message 14 of 19

barthbradley
Consultant
Consultant

Yes, I get it. That's what I used: the offset parameter. I just constructed my family to meet your criteria. I thought you stated that you did not want to use a minus sign.  

0 Likes
Message 15 of 19

Alfredo_Medina
Mentor
Mentor

@Anonymous wrote:

...

 

No? 


No. Notice in my illustration above, only one parameter is needed, and the value is always positive. The 2 feet is a fixed dimension. My point is that the solution does not need to be complicated, with negatives, positives, and yes/no parameters and all that. Seems to me that it can be very simple. Just my opinion, of course. There are multiple ways to do things.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 16 of 19

KraiggC
Advocate
Advocate

Gotcha.. I was just confused at the time of creating the family.

0 Likes
Message 17 of 19

barthbradley
Consultant
Consultant

So, if I were to use your family @Alfredo_Medina, what dimension value would I input to offset the family 0'-1" above the Ref. Level? Or, 0'-1" below the Ref. Level?  

0 Likes
Message 18 of 19

Alfredo_Medina
Mentor
Mentor
  • 2'-1"
  • 1'-11"

Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 19 of 19

barthbradley
Consultant
Consultant

@Alfredo_Medina wrote:
  • 2'-1"
  • 1'-11"

 

...so there's math involved? 

 

Smiley Wink

0 Likes