Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit Family Optionally Make one parameter equal to another

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
martyo
4088 Views, 2 Replies

Revit Family Optionally Make one parameter equal to another

Hi

 

I'm creating a revity family. For the sake of simplicity lets say I'm creating a shape that has three dimensions A, B and C. These are locked to dimensions and can be set by the user in the normal way. Basically I would like to have another Yes/No parameter in the family which when set to yes would automatically make A = C, with C being greyed out and its value set to A's value.

 

Is this possible, or do I have to create two separate families?

 

Many thanks.

2 REPLIES 2
Message 2 of 3
Scott_Wilson
in reply to: martyo

Are you asking whether this is possible using the API?

 

If so, then it could be done in many ways, one possible way is to use an updater to detect changess to a family instance and manually enforce the parameter contraints as appropriate. This is likely not to be the most effiecinet way, just one quick example.

 

You could do this without using the API though, if you apply the dimension parameters to the geometry indirectly you can then use conditional statements in the parameter formulas to use or ignore individual parameters as needed.

 

For example if you had two dimension parameters, one simply called 'X' and another called 'Calculated X', then created similar for the other dimensions. You could then mkae a Yes/No parameter called 'Constrain X to Y' and then in the formula for 'Calculated X' put something like "if(Constrain X to Y,Y,X)". It does gets more complex when you want to mix and match the master / slave parameter combinations. Have fun.

Message 3 of 3
martyo
in reply to: Scott_Wilson

That's perfect. I will do it without using the api. Many thanks for your help.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community