How refresh result of "active view"

Hi all, I make this code. This code insert in the parameters “NIV” (level) the name of the level of a wall. After execution, all wall of level X have a parameters “NIV” with X. My problem is when i change of level in revit, the result of “active view” not change. The result is not refresh when i change level. I test the fonction in package “springnodes” with the enter “refresh” but it’s not better. How refresh this fonction? Thanks you for your help and sorry for my english. .


Have you tried switching the Boolean to false then clicking run then back to true as this usually sorts out any issues

What Brendan said should work. The boolen is new to the active view node before it was there you would have to make all changes you need save close reopen and change the active view in revit before running again.

Yes if after the first execution, i change level in revit and i click on true, tle level change. And if i change again the level, i must to click false for refresh the active level.

It’s acceptable but maybe exist a node for automatically refresh?

<!–StartFragment–>Thank you for your help.<!–EndFragment–>

I would also like to add on to this question. Why is the standard OOTB Node called ‘Active View’ when it does not return the name of the active view? Is it something I am doing wrong?

The OOTB node needs to know what document it is looking at.

And a way to toggle this node.

Thanks John. I got that part but find that when I switch views the Active View always returns the first view I was in. In other words, it doesn’t give me the active view. I have to delete and remake the nodes in order for it to return the active view. (doesn’t work with Schedule and other views as well)

@Jay_Polding - refer to my edit above

Might be better to start another topic for this.

Thanks. Funny thing about the Boolean Node, seems you have to toggle it each time you switch view. I know you are just trying to help me John and I don’t want to sound unappreciative but what is the point? Or, is there a way for the node to refresh itself? If I have to toggle back and forth each time it defeats the purpose of automation. Maybe there is a thread about this already…? (besides that Jeremy posed the same complaint as me in March)

Thanks again for all your help

Yes, previously discussed here.

But, if you really want it to refresh, we can do this periodically with web request nodes. I’m not sure of a way to do this upon activating a new view.

I’ve run into this issue, and after not finding a solution through custom nodes or python programming, i just opened a new drafting view, tiled windows, and ran the script in the empty window.

Not elegant, but it’s easier than deleting the active view node and replacing it.

If anyone was looking for a refresh automatically while using native nodes (no packages or python) then I found this worked

Obviously I doubt many views will have the same amount of elements in them so it seems to auto refresh if you change the view.

This works pretty well and I have used it before. One tip: Make sure to right click on All Elements in Active View and disable preview. Some of the stuff will auto render in the viewport.