Hello,
I’m trying to test a gh definition by gh player but it seems that metahopper expire component don’t work in this way with gh player mode (only when the gh definition is open).
Has this ever happened to you?
Thank you
Hello,
I’m trying to test a gh definition by gh player but it seems that metahopper expire component don’t work in this way with gh player mode (only when the gh definition is open).
Has this ever happened to you?
Thank you
Does anyone have any suggestions?
Thank you
Your initial request is very vague.
Grasshopper Player is probably used by a few % of Rhino total users, and devs probably put similar effort into it.
Can you be more specific about your problem?
Expiring a component is something really unusual even for normal grasshopper definition, even more if that is expected to happen during a “command” made from grasshopper player.
What are you doing?
Can you post an example?
The GH Player has one major difference to the GH Canvas - its a ‘one pass only’ setup.
It runs thru the GH script ONCE then exits - there is nothing to actually expire after this.
What are you actually trying to do?
Cheers
DK
Hello @maje90,
I attached a screenshot of gh definition part.
The problem is when I try gh definition via gh canvas works well, but when I try to replicate the same behavior via gh player it doesn’t seem to work.
Thank you again
Have you considered this:
?
Thank you @maje90 for your suggestion, but I need of UI interface by human ui components (not by prompt command like gh player)
Hello @kiteboardshaper,
thank you, for your explain. See attached below.
Do you have any suggestion to get around the problem you describe?
Hi mate,
YES, if you have a read thru this:
You will see how it is possible to create a GH file with a HumanUI interface and compile it with the rhino script compiler.
You need to do a couple of interesting tricks with GH to get it to stay alive and allow your file to be useable.
This is how I’ve built/compile and distribute my kite design plugin KaroroCAD.
Cheers
DK
Thank you @kiteboardshaper,
I already tried to compile gh definition to obtain a .rhi plugin, but the problem is that it just doesn’t work for the part of commands they work with metahopper (expire) components…the rest of ui works well…It seems is a problem related to expire solution components.
Gh player is the way to launch plugin by prompt command…If there was another way to launch the plugin…
Thank a lot again for suggestions!
Can I ask WHY you are needing to expire the file picker component from HumanUI?
That’s not a very usual code practice for HumanUI.
Cheers
DK
Does checking the checkbox in the Document Settings to “Keep the file open after the command completes” help in this situation?
yes, @AndyPayne
Here my screenshot
That checkbox was added to Rhino 8. Are you using Rhino 8?
Yes, but the gh definition it was developed in Rhino 7 and must works for this version.
Do you have any solution about it?
Thank you again
Unfortunately, I don’t think that feature will be backported to Rhino 7 at this point.
I @kiteboardshaper,
I need to use expire metahopper to clear values of some human ui components. It was needed to clear values in human ui interface.
Do you have an alternative solution on it?
Thank you
To clear the HumanUI values I would have a panel connected to the default value input for that HumanUI component and write a blank value to that using the Human Set Panel components:
Code sample attached - made for a Text Box but can be used on any HumanUI that has a default value input. (Also has my sample save/reload values to JSON file in the same file - might be useful)
Cheers
DK
240502_Save and reload of HumanUI state example with clearing logic.gh (24.8 KB)
OK - I also made a sample that clears the file path from the file picker component:
240502_Clear File Path in HumanUI.gh (25.2 KB)
Thank you @kiteboardshaper,
I tried it and work well! also when I compile gh file.
So if the input text in a “text box” ui component comes from another component (not a panel) as a result, do have another way to clear it?
Thank you again