I have a task to review “VISUALLY” if a note or watermark if OFF on couple of sheets. I have created a graph
that will get the list of sheets on the viewsets, what I want to do is to make each sheet the active view and VISUALLY look at my screen to see if the watermark is off (I know is a boring task but someone has to do it ) and when all sheets on the viewsets are good to go I can then send it for batch plotting.
If this can be done I also thinking if a time delay can be added before it cycle to the next sheet so it will give me time to review (i.e. like 5 second delay).
Unfortunately you cannot switch views in Dynamo at this point in time. If you want to do that you can do it with the API and using Sharpdevelop or by creating an add in with visual studio. This is relatively easy to do if you know some C# programming and the Revit API. I would recommmend the sharpdevlop route if you are a begginer.
@4bimferdie.espiritu note that the only way to do this relies on an asynchronous process, and based on your OP you wont be able to achieve this in a single node. Its all about control: Revit needs to be notified of the the view change, thats the function of RequestViewChange, but this can only happen once Dynamo has completed its process. Since you want Dynamo to iterate through a list of views, it will need to be in control throughout. Hence, the view wont update as Revit wont receive the notification. Only one view will be set; whichever one is last in your list, as that’s when the Dynamo process will end and control is returned to Revit. I’ve explained the problem here:
One way that might be worth exploring to get around this limitation would be to have one node which sets the view, then another node to pause, before the first node is executed again (i.e. the set view node). Another way might be a hack; for example, calling a method which requires the user to select something in Revit; if its possible to override this process so the selection is automated, i.e. select a dummy object (as this would have to pass control back to Revit, then return it Dynamo) and the user is not even aware its happened, then you will be able to achieve what you’re asking in one node without protracting the workflow!
Very interesting @Thomas_Mahon. I haven’t played with this yet, but could you use periodic updating to do this? Or maybe a taskdialog (although, task dialog is a long shot as it still sits within execution)
Hi @Daniel_Woodcock1 interesting idea, I haven’t tested it but definitely worth exploring. As far as I’m aware though, Python nodes don’t support periodic updating, or at least they need a node on the graph that supports periodic updating before Dynamo periodic execution is selectable. If not…then the only way to test the theory is using C#
Cool. I had to test this, it was bugging me, but I got this working! The ForceCloseTransaction method worked perfectly. I have my own counter node which you can find here… as a .dll. Be sure to unblock and import and should work just fine.
I use this to iterate through lists and uses periodic updating. I have some personal nodes which I can upload here if needed. But here is a demo…