How can create a dynamo to be able to place a lighting fixtures in any room by number lighting in column and rows then the dynamo place all lighting fixture as per the attachment picture thanks in advance
I am working on that one myself, this will get you started…
Attach your can light family in the top left box. This will at least get it in the room. The CENTROID node creates a point that is at 4’-0" from the floor, you can play around with Z AXIS node to move it up, I am trying to get it to snap to a ceiling or reference plane like normal.
I gave it a try assuming all your rooms have ceilings and lights are ceiling based… but fell short.
- collect all ceilings
- get surfaces of ceilings
- sort by maximum surface area to get the target surface of the ceilings(there should be two, under and upper)
- place a mid uv point in both surfaces and check its z coordinates to get the lower surfaces of the ceilings, where the lights will be placed.
- place points by uv coordinates( i just had 4 in the example, .25 and .75, like your example image) and place family by points.
however it seems like its not really placing the right amount of lightings with my try. tested with 3 ceilings with different dimensions and different levels.
could anyone help me figure out whats wrong with my graph? or a better solution? it seems like im having trouble in the list department.
Light fixtures are typically face or plane based, they will either snap to ceilings or reference planes when manually placed into a Revit model. I cannot get Dynamo to see the planes. I can only get Dynamo to insert families using an X,Y,Z point in the middle of a fixture. This same headache applies to placing wall receptacles.
Apparently Dynamo can only see faces because it is looking for geometry or specific coordinates and not planes.
@Bill_Mutert the reason is that the FamilyInstance.ByPoint node implements only one overload of the Document.Create.NewFamilyInstance() methods available in the Revit API. If you have a reference to a face or plane you can use a Python script to implement other overloads as well.
I am not a code writer, any thoughts on a node based approach?
I’m working on same issue now, any solution? without having to think about face based fixtures?
you can try the insert by point node but the element will lose host and elevation isn’t editable
there is this video of an addin doing what you descried though