When attempting to run the following script with
ghenv is unknown. I figure this is because the GH environment is not available at runtime, as it would be inside a GHPython component. How would I write a similar function at runtime?
import Grasshopper as gh doc = ghenv.Component.OnPingDocument()
Have tried, but get an error `OnPingDocument’ takes 1 arguement, but confused by which value give the method. I am sure I miss understanding the documentation.
from Grasshopper.Kernel import GH_Component print(GH_Component.OnPingDocument())