Replacing a family by set rotation not working

Fix Selected Starline Busway-250A family Orientation.dyn (66.5 KB)
Starline Busway-250A.rfa (420 KB)
Sure, here you go thanks!

It is definiately a problem with dynamo not refreshing the input when I toggle the refresh button. I am having the same issue in another script. Is this a bug in this version of dynamo? I tried it with the pick elements node, but got the same exact problem:

Actually now I believe it may be a problem with the new family it is placing. for some reason, everytime I press run, it wants to use the same element ID on the new element it is placing as it did the previous time. Since it is doing that, it is thereby deleting any families actually created in the previous run. and appears to be using their data of orientation to place the new families. Both of which are wrong. Is there a way to fix this?

Alright, this is mushrooming into a large problem for me. Many of my users are reporting issues with dynamo not refreshing in between uses. and all those scripts were working fine before. @Nick_Boyts Do you happen to have any idea what is going on? Thanks in advance!

Have you tried closing Dynamo between runs?

I actually encountered the same “empty” w/ Element ID last night when I was looking at your graph from your other post but I hadn’t made mention of it because I wanted to be certain it was of the same cause as what you are seeing here. It did occur after rerunning the graph multiple times but it is preventable by “undoing” the previous run in Revit and refreshing the graph

When this problem first presented itself I did. But I havent sense the changes I made. at that time it didnt help.

If I undo every run, I wont make any progress, so I am not following you here.

Ah I was assuming that as you re-run you are overriding the previous runs which is essentially undoing and redoing. I think refreshing the graph would still solve the issue

I just had a minute to look at your graph and now I understand how you are using it now and why undo doesn’t make sense. The culprit seems to lie in the deletion of the elements. They need to be deleted after you have gotten their locations, vectors, parameter values, etc. otherwise the current selection collector returns “empty” elements and the next run of the graph doesn’t update so it show you the last run’s values. A Passthrough node before the Springs.Doc.DeleteElements might do it.

What is a passthrough node?

Passthrough is in the Clockwork package, but it can be written in a code block like so:

Essentially you need to force the order of operations of your graph so that the elements are not deleted at the same time you are trying to get data from them

No that doesnt seem to work as far as I can tell:

Did you reset before running your graph with the Passthrough node? Your input shows the empty element so even when it does work it’s going to pass through the empty element.

1 Like

Yes, i did reset it. I reset it before every run. there is seemingly no response to the toggle switch.

I meant close Dynamo and reopen.

No it does not appear to do it if I close dynamo all the way down and then restart it.

Does not appear to reset or does not appear to show the empty?

I think you just needed to completely reset and have a clean start before anything would work. Once the empty element shows up I think that’s your only option for getting rid of it. Hopefully the passthrough node keeps it from returning though.

if i close dynamo, it doesnt have a problem the first time i run it. But if I run it a second time the problem shows up again. You mean that I have to restart dynamo on every single use? That would take way too long because I am on a VM and Dynamo takes forever to load. Besides, thats not how it used to work. Why should I have to do that now? Thanks

Strange. I was hoping one reset would fix it. I’ll try to dig deeper when I get some time.

1 Like