Is it possible to connect a Revit family to Dynamo?

I created a Revit family , where everything is connected to a single parameter. Can I connect the family to dynamo for change only this parameter? If this is possible, how can I do it?

Thank you

Maria

Yes.

Try the Element.SetParameterByName node and other associated nodes

Just use Element.GetParameterValueByName to select the parameter of the specific family, then re-feed back

the new value of parameter via Element.SetParameterByName.

I use Dynamo for the first time, excuse me for stupid questions:

  1. is “clearance” the name of your parameter?

  2. I should select elements in my metric model family?

I’m putting parameter name in code block and select my model, but it doesn’t work.

thanks to all

Select the family in the Project environment and use the paramater name in that family.

  1. is “clearance” the name of your parameter? - the example above was a shared parameter named “CLEARANCE”. In you family you need to create/add the shared parameter.

  2. second option is to create an instance type parameter in the family - see attached screen capture (the family name is CLEARANCE as well but the clearance height shared param. is the one you were asking. The other instance parameter in this example is named “W”.

Thank you. I’m trying to do it, in two ways how you has showed me, but dynamo doesn’t find my parameter. It’s an istance and if I alter it in Revit, my family change.

  1. create a generic family
  2. in the floor plan, add two Reference Planes
  3. add a dimension line, that connect the two reference plane
    with the center Reference Plane
    of the family itself.
  4. use Equal to make sure they are symmetrical.
  5. create an extrusion and snap the two sides to the Reference Planes you created.
    Lock the sides of the extrusion to the
    Reference Planes.
  6. add an instance parameter - I named that “WIDTH”
  7. create a dimension that connect the two Ref. Planes - label that “WIDTH”
  8. load the family into a project
  9. while in Dynamo script, pull down the “Family Types” menu and select the family you just loaded.
  10. everything should work - “Houston, we have lift off”.

 

CLEARANCE_2 REVIT_DYNAMO_PARAMETER_1

1 Like