I have a graph to check file versions and have used DataShapes to generate a UI for it. That part works great, but I want to add something other than the weird error-ish dialog that pops up when I hit cancel. Can be either a statement along the lines of “Canceled By User” or just a return to what would essentially be a zero document state. I’ve gotten an IF node and a Passthrough to work, but I’m getting both the result of the cancel button and the actual file info process and am a bit lost at this point…
How can I set the result to be either/or, rather than both?
G’day,
It seems your plugging in a directory path into your input form, so you might have some troubles, but I’ll let you have a crack at it for a little while and post up my solution if you’re still having troubles.
Essentially, the above just replaces an ‘empty’ value with the canceled message.
Replace your ignore statement with somehing like this (typing from memory):
Canceled?
"Canceled by user":
BasicFileSavedInVersion;
Where canceled is the output from the ‘canceled’ port of the Datashapes UI node, and BasicFileSavedInVersion is the result of the string from array. No need for a wait for - both have to arrive before anything can be processed anyway. The output of that codeblock gets sent to a single UI message node. This is more or less what @Steven is indicating.
Also I prefer using a Python node and calling ctypes or a Revit popup for messages like this as there are many more options available that way.
I can try to post an example of this later today if you get lost attempting it yourself.