Lighting from IFC to Revit

Hi! I’m trying to do a node for convert lighting IFC elements to native Revit lighting families.

I have managed to obtain the centroids of the solids of these IFC elements, later using the node “FamilyInstance.ByPointAndLevel” I insert the families of luminaires in these positions.
Finally with the node “Element.SetParameterByName” I define the height for each luminaire based on the Z coordinate of the IFC element.

However all the fixtures in Revit are of the same type and I would like to know how I can insert a different fixture based on the IFC element name.

Thanks for your help!

1 Like

You are feeding a single item from the family types dropdown into the FamilyInstance.ByPointAndLevel node - try feeding a list which matches the family type in the IFC file.

Thanks for your help @jacob.small . I am aware that I am only entering one family type at the moment, but I don’t know how I can make a list of family types that matches the IFC element list.
Could you guide me?

Thanks!

A path to consider from your Element.Name node -

  • Use a List.UniqueItems to get the many possible options (looks like you have three).
  • Take each item in the list of UniqueItems and build a dictionary for each with a Dictionary.ByKeysValues node. The Keys are the family name, the values is a list of family types. Perhaps a List.Create node and many family type dropdowns may be the easiest way to do this one time, but you could also use an external document such as an excel file to do the 1:1 mapping (be sure to move your element IDs with the family names).
  • Take the original list of names form the Element.name node and get the value in the dictionary from them with a Dictionary.ValueAtKey node. Now you should have a family type for each IFC instance.
  • Wire the result of the Dictionary.ValueAtKey node to the FamilyType input of the FamilyInstance.ByPointAndLevel

Thanks again for your answer @jacob.small

I don’t know if maybe is possible do a mapping with Data Shape.

I mean if it would be possible to make an interface in which from the IFC types to choose a Revit family and that take it to the node “FamilyInstance.ByPointAndLevel”
Sorry for so many questions but I’m new to Dynamo …

1 Like

Maybe, but how often will you be doing this? A graph run before the one which replaces the lighting fixtures which extracts all the IFC names and all the lighting fixture types and writes to excel is likely easier, and will prevent the user from having to redo all the data entry every time they want to update, instead focusing on just the new values (the ‘value at key’ will fail if a new IFC name type is added, so the warning would be produced and you’d know to look at it).

1 Like