Message Balloon to Panel possible? - to print in an automated process all errors to rhino

unhandled

#1

Hey everbody, does someone have a script that collects all the Message Ballons in one panel? Or is it even possible? I have an automated file which will be somewhere on a server, people will reach out to it. I wont be able to control all the results, so I thought it would be a great feature to print all the error balloons right on the to be captured rhino layout.


(David Rutten) #2

Yes and no, you can’t do it from a script that runs inside the file, because the script isn’t guaranteed to be the last thing that runs, therefore it will miss all the errors and warnings that happen afterwards. You’d have to write code which executes after a solution completes, then harvests all messages and then displays those messages without starting a new solution.

It can be done, even using vanilla C# script components, but it involves sidestepping all the usual pipelines.
Still interested?


#3

Sadly I have no clue of coding, but my interest is at its highest. If you give me a hint maybe i can figure it out my self to write the code.

I understand the solution problem. The code would be pluged into a completed solution, harvest how you explained, displays, but would does it mean:

? Since I will only capture the viewport from rhino and send this file to whoever reached out to it, i think the code does not have to do anything else than harvest and display.

And with a new solution the code will start again, right?


(David Rutten) #4

Since the code has to run every time a solution completes, it should then trigger a new solution as that will get you into a never ending sequence of triggers and handlers. One possible way out is to just draw the messages on the canvas without running them to another object like a panel.


(David Rutten) #5

The attached file contains a script which collects all warnings and errors, but then only displays the amount of each in the top left corner of the canvas. Is this the sort of approach that would work for you?
The location of the text can of course be changed, either manually in the code or by exposing an additional input or by anchoring it to the script component itself.

Also the font and colour choices are up for grabs, as is the layering. Text can be displayed behind or in front of regular objects.

message pump.gh (8.1 KB)


#6

Wow. thanks so far. Actually the text should appear in front of the rhino viewport. so when i capture rhino viewport, people would see directly, whether any problems occured or not.


(David Rutten) #7

Every viewport, or just the active one? Or a specifically named one?


#8

Every viewport would be great. I’d like to capture multiple ones. Besides this: is it possible to expand the size of the viewports, so that they would overlap, but any capture component would still be working?


(David Rutten) #9

message pump.gh (8.0 KB)


#10

sry for the late reply. This was very helpfull! Thank you