Popups appear several times

I know this has been mentioned before but I didn’t quite understand how to stop it.

I have some winforms in my script.
First run they all appear properly.

Other runs they appear multiple times, even if I update one that’s, say #3 in the sequence, #1 will appear more than once and so will #2.

Why does this happen and how can I stop it?

I’ve just tried to recreate this with a simple script with 4 winforms but nope… No glitch.

So I am guessing it’s not the winforms but something in the script that’s maybe making the winforms think they’re being told to run repeatedly.

Does no one else get this issue?

I don’t generate UIs as player doesn’t have these issues… :rofl:

My guess is that it is checking to see what is ‘dirty’ and as a result it is doing a ‘false’ run before the real one, but I cannot confirm.

Can you reproduce from dynamo Sandbox, or is it only in Revit?

I only ever use Dynamo in Revit.

Player still scares people, I’ve found lovely pop ups with super simple instructions make people less scared. :expressionless:

In Player I don’t get the issue… But that doesn’t help me when I’m coding the stuff.

But can you reproduce in Sandbox? If so we can narrow in on the cause to a Dynamo Core’ issue. If not we can narrow down the cause to a Dynamo Revit issue.

I don’t have sandbox and I can’t install anything as I don’t have admin rights. :expressionless:

Also, all the scripts read/ write to Revit so I’m not sure how I could recreate in sandbox anyway?

Good thing there is no installation - just unzip the file and double click on the exe and you’re good to go. :slight_smile:

Can sandbox read stuff from Revit?

No - no Revit API access. Hence we can isolate the issue.

:thinking: :confused:

I mean, the winform is not part of the Revit API, so there should be nothing in your nodes which call the Revit API directly; though if you’re mixing API calls it could be harder to pull the form out. Once done try providing it with a list or other bit to get it to reproduce in Revit and then move that bit over to sandbox to see if you can trigger there. If not, we have narrowed in on the issue.

I have recreated the glitch! Whooo.

So it seems that because I often grab something from Revit and use it to feed through the code… maybe it reads it once and twice and … er… something.

Have a look at the attached. Only the final pop up seems to repeat in this one.

It won’t glitch in Player… But if you run it in Dynamo it will.
Not sandbox, Revit Dyno.

GlitchAttempt.dyn (59.9 KB)

My guess is that since you are grabbing something from Revit’s trace tooling is triggering the UI before the content is actually processed.

Did you get the same glitch when you ran it?

Any ideas on how to stop it, it’s bloody maddening!

I haven’t been at the PC yet, so no. I’m just guessing as to why so far. :rofl:

Yes, this is common with any UI nodes when running from Dynamo. Executing your graph multiple times will cause the UI nodes to update on the initial run and then again if there is a value change to the input. If you have more than one UI node this can start a waterfall that re-executes nodes multiple times per run. The workaround is to “clear out” the run data by running the graph with a disconnected input (forced nulls) between real executions. The fix is to use Player.

Ty, I’ll try that. Bit of a pain in the moose tho.

Also… it’s hard to use player when you’re writing the code… :stuck_out_tongue_closed_eyes:

That’s what the workaround is for. I write and troubleshoot in Dynamo but deploy to Player.

Same, but it’s driving me mad when I’m writing it.

Oooo… I just tested it with two of my start inputs and it seems fingers crossed to help a lot.

You are epic :smiley: :partying_face: