I made an error in my previous python component and didn’t call sc.doc = ghdoc at the end. I was frustrated though, because adding it in didn’t seem to effect the error. But I just did a test with a simple script and adding sc.doc = ghdoc at the end of a script released it. I think it was just a computational order error.
Unless you are saying that it should work despite a python component calling sc.doc = Rhino.RhinoDoc.ActiveDoc without adding sc.doc = ghdoc? In which case it does break the HB components.
No problem. This script has a toggle to either allow sc.doc = ghdoc to be called (True) or not (False). If set to True and recomputed, Radiation Analysis works fine. If not, I get the error “selectedSkyMtx failed to collect data! Use selectSkyMtx component to generate the selectedSkyMtx.”
Which, actually, in doing some digging, is a failure in RadiationAnalysis
line 256: analysisMesh, analysisBrep = lb_preparation.cleanAndCoerceList(geometry)
which returns empty and in turn causes
line 266: analysisSrfs = analysisMesh + analysisMeshedBrep
to be empty which in turn causes
line 103: elif cumSky_radiationStudy != None and (len(cumSky_radiationStudy) == 456 or len(cumSky_radiationStudy) == 1752) and analysisSrfs:
to return false, which causes the selectedSkyMtx error.
Thanks for the file @sleaman. Unfortunately, I am unable to re-create the error at my end. I would also share that I have not encountered this error. I always use meters as a unit in Rhino and 0.001 as absolute tolerance. What settings are you using?
Same settings, it doesn’t seem to make a difference. Just to check, when you open the test file with a fresh instance of Grasshopper, it won’t fail unless the Python component toggle is set to False and you recompute.
All I can think is that I may have caused issues with my IronPython install when I also installed pyRevit and RhinoInsideRevit, though I’m not sure what I could have done there. My version of IronPython is IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (64-bit).