ETA: This post (and the previous one and next 8) were moved from another topic (Python script runs twice - #7), because it was not the same issue as in that other topic, which was 100% a python script issue and not a GrasshopperPlayer or RhinoInside Revit issue.
Hi @diana.ofcg, do you have a python script in your grasshopper file? If not, then this is not the same issue.
In that case, it would be better to open a new thread describing what you are trying to accomplish, the problem you are experiencing, and including your grasshopper definition so others can look into it and help you more easily.
I cannot figure out why the object is baking twice in Revit, I’d appreciate any help I can get. I have been seeing a few similar posts with no obvious solution.
Twice baking it seems, although I’m not sure how to tell. I have this also hapenning when I use the ‘Get Geometry’ command without the python script. It seems it’s the baking that is the issue.
I’ve taken a look. I didn’t install Rhino.Inside for AutoDesk. The only script component I found, is a Rhino 7 C# component, and I don’t know if those are different to Python ones or not.
If I were to take a guess based on general Grasshopper experience, the most likely explanation is the .gh file does the same thing when it is first opened either in Grasshopper Player or in Grasshopper (that maybe has gone unnoticed), that it also does when activated in GH (e.g. toggling a boolean, if the boolean is set to True, and then the definition saved).
Human UI can do some clever stuff. I don’t know if it can do background listeners, but perhaps it’s theoretically possible if remote that something changes in the Grasshopper Player environment, that causes one of the outputs from the first execution of the script, to raise an event that a listener reacts to, and triggers the script again (in such a way that it executes twice only, not in an infinite loop).
There’re a lot of moving parts in that file overall. Try disabling parts of it until the fewest ones necessary to cause it to run twice is isolated.
I actually managed to do a human ui script that doesn’t duplicate, but my issue for this senario is that I want to create a rhino button that runs a grasshopper player script to select objects from rhino and bake them into Revit.
Example 01:
I am running this within the grasshopper environment, which seems to be working fine and is not duplicating the geometry when baking, that’s great.
Example 02:
Here I am running the Grasshopper script through the player and attached it to a button like this
-GrasshopperPlayer “file path.gh”
The problem is that it’s baking it once when I press enter the first time, but then it comes up with the second menue with this
and this (undo) option is what it’s causing it to bake a second time.
How can I avoid that from hapenning?
I can open another ticket with this info if it doesn’t derail this ticket so much.
Thanks for uploading those videos, but I can’t tell what’s what in them. I’ve not come across that undo option before, but I’ve not used GrasshopperPlayer.