Please Help! Script for placing lights

I have design a script for placing lights. It is working for two levels when I am placing lights in third level it is removing lights from the second level and placing it on third. I do not know what is problem. Please help me out I am sharing my dynamo file. If you try the to run please place lights on three levels.
Placing Electrical Lights - Face.dyn (1.4 MB)

Hello @sbukhari.cem18nit …isnt that the same question you have ask many times now…if you upload your files…rvt,acad,link and what it needed then i will take a look

Sounds like element binding woes. Read up on this aspect of Dynamo here: Element Binding in Revit

2 Likes

I have attached .rvt file in which there are different plans imported in three levels. I have to place lights (Light .rfa file attached) at all three levels by selected CAD file one by one through dynamo script.

Custom Family Light.rfa (404 KB)
Experiment Project.rvt (5.3 MB)
Placing Electrical Lights - Face.dyn (1.4 MB)

Think Jacob is right :wink: sounds like elementbinding have your tried to run from player ?

No I am not running the script from the player. I have an idea like I can copy paste the script as per the requirements of levels and select levels in every script separately. Do you have any other recommendations?

OK i will take a look later :wink: but run from palyer will avoid elemnt binding so it doesnt delete your previus run…

@jacob.small and @sovitek . I would like to thank both of you. The script is now working well.
I need little recommendation for getting grip on dynamo and coding. Will you suggest me some platform.

Once again bundle of thanks!

1 Like

yeps try follow Gavin he had a lot of great videos for learning…try it :wink:

1 Like

@sovitek @jacob.small Sorry to disturb you again. You guys already helped me a lot once again thank you. There is a problem I am facing that when I am downloading any family (Lighting fixtures, MEP etc) the elevation of family is not changing it is always placed the family at the ground floor. I have tried to avoid element binding. Also when I placed any generic family the script is working properly.
Can you please help me.
Placing Electrical Lights - ElementBinding.dyn (177.0 KB)